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.
As it should appear on the invoice.
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" />errorshows once the field has been left, or with[show](after a submit).type,placeholder,required,name.- Sends
(blur). Styling:data-touched,data-dirty,data-filled,data-invalidon the field; partslabel,control,description,error.
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.