GitHub

/ form-field

FormField

@kumiki/components/form-field

Compound <Root> / <Label> / <Input> / <Errors> / <Description> for accessible form fields with Standard Schema validation.

This component, layer by layer

Styled, copy-paste presets (preview). Run pnpm kumiki add to drop the source into your project, then edit freely.

Live preview

Live preview…

Install
pnpm add @kumiki/atelier
Field with Standard Schema validation
<script lang="ts">
  import { Tailwind as Field } from '@kumiki/atelier/form-field';
  import { z } from 'zod';

  const validator = z.string().email('Enter a valid email');
  let value = $state('');
</script>

<Field.Root initialValue="" bind:value name="email" {validator} validateOn="blur">
  <Field.Label>Email</Field.Label>
  <Field.Input type="email" autocomplete="email" />
  <Field.Description>We never share your address.</Field.Description>
  <Field.Errors />
</Field.Root>

/ accessibility

Accessibility

axe-core — run on every PR (LTR + RTL × every documented state).

Keyboard

No component-specific keymap. Inherits standard browser focus / activation behaviour.

Test discipline

  • axe-core — run on every PR (LTR + RTL × every documented state).
  • APG keyboard tests — Playwright, hand-written per pattern.
  • VoiceOver / NVDA — Guidepup nightly schedule.
  • Type-level required names — title / aria-label / aria-labelledby.