AncrelDocumentationv0.3.0

Search documentation

    Playground / fe.select

    Select playground

    A native option picker with an optional prompt and Field validation.

    Preview

    Props editor

    State matrix

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

    dark / comfortable
    VariantDefaultHoverFocus-visibleActiveDisabled
    sm
    md

    Published example

    API reference
    'use client'
    
    import { Field, Select } from '@ancrel/ui'
    import '@ancrel/tokens/css'
    import '@ancrel/ui/styles.css'
    
    export default function App() {
      return (
        <Field label="Paper size" required>
          <Select name="paper" placeholder="Choose a size" options={[
            { value: 'a4', label: 'A4' },
            { value: 'letter', label: 'Letter' },
            { value: 'legal', label: 'Legal', disabled: true },
          ]} />
        </Field>
      )
    }