Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationForm

Form

A flexible, validation-agnostic form component that provides error management and semantic HTML structure. Works with any validation library.

Install Dependencies

npx
quickcode-ui add Form

Example

Form Example

Complete Registration Form

Showcase of all available input components

Must be at least 8 characters long

You can add 5 more items.

Press Enter to add tags (max 5)

Upload PDF or Word document

Minimum 10 characters

Receive email notifications

Props

Form

PropTypeDefaultDescription
errorsRecord<string, { message?: string }>Error object from your validation library
onSubmit(e: FormEvent) => voidForm submission handler
classNamestringAdditional CSS classes
childrenReactNodeForm content

Form.Field

PropTypeDefaultDescription
namestringField name for error tracking
classNamestringAdditional CSS classes
childrenReactNodeField content (Label, Control, Message)

Form.Label

Inherits all props from the Label component. Automatically turns red when field has an error.

Form.Control

PropTypeDefaultDescription
classNamestringAdditional CSS classes
childrenReactNodeInput component (from your library)

Form.Description

PropTypeDefaultDescription
classNamestringAdditional CSS classes
childrenReactNodeHelper text for the field

Form.Message

PropTypeDefaultDescription
classNamestringAdditional CSS classes
Last updated on