Practic BUI (Base UI) - v1.0.0
    Preparing search index...

    Variable FieldWidgetConst

    FieldWidget: (props: FieldWidgetProps) => Element & {
        Control: (props: FieldWidgetControlProps) => Element;
        Root: (props: FieldWidgetRootProps) => Element;
    } = ...

    A field whose text can persist: the preset (<FieldWidget label='Name' />), and the parts that add to Base UI's, Root (the stored text) and Control (bound to it). The label, description and error are the styled Field ones.

    Type Declaration

      • (props: FieldWidgetProps): Element
      • The common field: a label, the control, and a description below it, whose text can persist. The root's own props, such as name, disabled and validate, pass through; any other arrangement composes FieldWidget.Root.

        Parameters

        Returns Element

    <FieldWidget.Root name='code' data-key='practic_app_code' data-attr='value'>
    <Field.Label>Code</Field.Label>
    <FieldWidget.Control inputMode='numeric' required />
    <Field.Error match='valueMissing'>Enter the code.</Field.Error>
    </FieldWidget.Root>