Components › Components

Field

A labelled text input with a description and an error, wired by id, showing the error once you leave it.

Styled: Field on ui.clarusjs.com, ready to copy, in plain CSS or Tailwind.

tscl
@import uiField from '@clarusjs/ui-primitives/field.tscl'

<uiField id="name" label="Name" description="As on the invoice." [error]="errors.name" [(value)]="form.name" />

From @clarusjs/ui-primitives, styled by @clarusjs/ui: @import '@clarusjs/ui/ui.css' once, and change the look with its --ui- tokens (--ui-accent, --ui-radius, --ui-font…). Without it, the part is unstyled and works the same.