AncrelDocumentationv0.3.0

Search documentation

    Playground / fe.field

    Field playground

    A label, help text and validation message linked to one native form control.

    Preview

    Props editor

    State matrix

    Hover a specimen, Tab to focus, or hold the pointer down to inspect its native state.

    dark / comfortable
    VariantDefaultHoverFocus-visibleActive
    Sample

    Published example

    API reference
    'use client'
    
    import { Field, TextInput } from '@ancrel/ui'
    import '@ancrel/tokens/css'
    import '@ancrel/ui/styles.css'
    
    export default function App() {
      return (
        <Field label="File name" description="Include the file extension." required>
          <TextInput name="filename" placeholder="notes.txt" leading={<span aria-hidden="true">/</span>} />
        </Field>
      )
    }