Solidtype_heroui.Text_fieldHeroUI's TextField: Kobalte's TextField.Root, a field's <div>, with HeroUI's classes from Styles.TextField, and the parts inside it as Kobalte's: its Label names its Input or Text_area, its Description describes it, and its Field_error shows while it is invalid. It keeps its value, controlled or its own, and declares its state as React Aria writes it -- disabled, invalid, read-only, required, and the focus within it.
<Text_field name="email" is_required=true>
<Label>"Email"</Label>
<Input type_=`email placeholder="ada@example.org" />
<Description>"We'll never share it."</Description>
<Field_error>"Enter a valid email."</Field_error>
</Text_field>Kobalte writes its own state on each part too -- data-valid, data-required and the rest, present and empty -- which HeroUI's styles, reading React Aria's "true", pass over; and gives the field's <div> the group role, and its input aria-required and aria-disabled beside the native required and disabled.
type field = {variant : unit -> [ `primary | `secondary ] option;disabled : unit -> bool;invalid : unit -> bool;read_only : unit -> bool;required : unit -> bool;}What a field's parts read of it: the variant its input takes where it sets none, and its state.
module Context : sig ... endmodule Props : sig ... endval make : Props.t -> Solidtype.Jsx.elementval component : Props.t Solidtype.Jsx.component