Skip to content
OTF Kit logoOTF Kit

Field

Input

Label + input + helper / error wrapper — the building block for every form row.

View in Storybook
Field
Loading Storybook preview…

Installation

bun add @otfdashkit/ui

Usage

Import Field from @otfdashkit/ui.

Code
// Field — Label + input + helper / error wrapper — the building block for every form row.
//
// Install:
//   bun add @otfdashkit/ui

import { Field } from '@otfdashkit/ui'

export function Example() {
  return (
    <Field>
      {/* your content */}
    </Field>
  )
}

Props

Props declared in the Field source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
childrenrequiredReactNode
classNamestring
descriptionstring
errorstring
labelstring
requiredboolean

Related