edbnedbn/ui
ComponentsTablesStandards
GitHub stars
Explorer
    • Welcome
    • Changelog
    • License
    • Form
    • Data Table
    • Date Picker
    • Typeset
    • Alert
    • Aspect Ratio
    • Avatar
    • Badge
    • Breadcrumb
    • Button Group
    • Button
    • Card
    • Empty
    • Input
    • Item
    • Kbd
    • Label
    • Native Select
    • Separator
    • Skeleton
    • Spinner
    • Table
    • Textarea
    • Accordion
    • Checkbox
    • Collapsible
    • Field
    • Input Group
    • Input Otp
    • Progress
    • Radio Group
    • Slider
    • Switch
    • Tabs
    • Toggle Group
    • Toggle
    • Alert Dialog
    • Combobox
    • Command
    • Context Menu
    • Dialog
    • Drawer
    • Dropdown Menu
    • Hover Card
    • Menubar
    • Navigation Menu
    • Popover
    • Select
    • Sheet
    • Tooltip
    • Attachment
    • Bubble
    • Calendar
    • Carousel
    • Chart
    • Direction
    • Marker
    • Message Scroller
    • Message
    • Pagination
    • Questionnaire
    • Resizable
    • Scroll Area
    • Sidebar
    • Sonner
    • Toast

Composition recipe

Form

Compose forms from Field, FieldLabel, FieldDescription, FieldError, and the appropriate input. Keep validation in your form library or application state.

No standalone wrapper
This recipe intentionally stays in application code. Install only the primitives your implementation uses.

Building blocks

fieldinputtextareacheckboxradio-group

Starting point

function ProfileForm() {
  return (
    <form className="space-y-6">
      <Field>
        <FieldLabel htmlFor="name">Name</FieldLabel>
        <Input id="name" name="name" required />
        <FieldDescription>Shown on your public profile.</FieldDescription>
      </Field>
      <Button type="submit">Save</Button>
    </form>
  )
}