form-input-usage

Automate consistent FormInput usage for labeled single-line form rows.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill form-input-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: form-input-usage
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/ui/skills/form-input-usage
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill form-input-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use after component-usage-ux when an app needs @techsio/ui-kit FormInput for labeled single-line fields with Label, Input, StatusText, validation status, help text, required, disabled, and size props.

Core Features & Use Cases

  • Labeled field rows with Label, Input, StatusText, and validation status
  • Consistent help text, required/disabled states, and sizing across forms
  • Reduced manual composition and guaranteed consistent spacing and behavior

Quick Start

Import the FormInput component from @techsio/ui-kit/molecules/form-input and render it with an id, label, and validateStatus to create a complete labeled field.

Frequently Asked Questions about form-input-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a labeled React form field with validation status and help text?

You can build a labeled React form field by rendering a single component that bundles the label, input, status text, validation status, help text, and required or disabled states together. This guarantees consistent spacing and behavior across forms without manual composition.

What is the best way to ensure consistent sizing and disabled states across React form inputs?

The best way to ensure consistent sizing and disabled states is to use a unified form input component that standardizes these properties via props. This enforces visual and behavioral consistency across all single-line form rows in your application.

Can I use a single React component for both required field indicators and validation error text?

Yes, you can use a single React component for required indicators and validation text because it accepts both required and validateStatus props. It automatically renders the necessary visual cues and status messages in one labeled row.

Does the FormInput component work without external validation libraries?

The FormInput component works without external validation libraries by accepting a validation status prop to display state visually. You handle the validation logic yourself and pass the resulting status to the component for rendering.

Why use a combined form input component instead of manually composing separate label and input elements?

Using a combined form input component instead of manually composing separate elements reduces boilerplate and guarantees consistent spacing. It streamlines the creation of labeled single-line rows by managing label, input, and status text internally.