strata

formsbuilt on ui sdk

Field & Input

A labeled text input with a description and an error message.

Dotted path, lowercase.

Add the rest of the address.

01 / usage

import { Field, FieldLabel, FieldDescription, FieldError, Input } from '@mikestecker/strata/ui'

import { Field, FieldDescription, FieldError, FieldLabel, Input } from '@mikestecker/strata/ui'

export default function FieldDemo() {
  return (
    <div style={{ display: 'grid', gap: 24, maxWidth: 360 }}>
      <Field name="token">
        <FieldLabel>Token name</FieldLabel>
        <Input placeholder="color.accent" />
        <FieldDescription>Dotted path, lowercase.</FieldDescription>
      </Field>
      <Field name="email" invalid>
        <FieldLabel>Email</FieldLabel>
        <Input type="email" defaultValue="hello@" />
        <FieldError>Add the rest of the address.</FieldError>
      </Field>
    </div>
  )
}

02 / parts

  • Field
  • FieldLabel
  • Input
  • FieldDescription
  • FieldError

03 / keyboard

  • Native text input behavior.

04 / agents

An agent fills it with setValue, finding it by its label. Password and one-time-code fields stay secret.