StepLeague reusable form components with accessibility features. Use when creating any form, input field, select dropdown, checkbox, or file upload in the application. Keywords: form, input, select, checkbox, textarea, file upload, accessibility, FormInput, FormSelect.
name: form-components
description: StepLeague reusable form components with accessibility features. Use when creating any form, input field, select dropdown, checkbox, or file upload in the application. Keywords: form, input, select, checkbox, textarea, file upload, accessibility, FormInput, FormSelect.
compatibility: Antigravity, Claude Code, Cursor
metadata:
version: "1.1"
project: "stepleague"
Form Components Skill
Core Rule
ALWAYS use form components from @/components/ui/form-fields.
These components:
Auto-generate id/name attributes
Include accessibility features (aria-describedby, aria-invalid)
import { FormCheckbox } from "@/components/ui/form-fields";
<FormCheckbox
fieldName="accept-terms"
label="I accept the terms and conditions"
checked={acceptedTerms}
onChange={(e) => setAcceptedTerms(e.target.checked)}
required
/>
<FormCheckbox
fieldName="remember-me"
label="Remember me on this device"
description="We'll keep you logged in for 30 days"
/>
FormTextarea
import { FormTextarea } from "@/components/ui/form-fields";
<FormTextarea
fieldName="feedback"
label="Your Feedback"
placeholder="Tell us what you think..."
rows={4}
maxLength={500}
value={feedback}
onChange={(e) => setFeedback(e.target.value)}
/>
FormFileInput
import { FormFileInput } from "@/components/ui/form-fields";
<FormFileInput
fieldName="screenshot"
label="Upload Screenshot"
accept="image/*"
onChange={handleFileChange}
description="PNG, JPG, or GIF up to 5MB"
error={fileError}
/>