Module Solidtype_heroui.Checkbox_group

HeroUI's CheckboxGroup: a <div role="group"> of Checkboxes, with HeroUI's classes from Styles.CheckboxGroup, that keeps the values its checkboxes check, controlled or its own. A checkbox inside it is checked while its value is among them, and checks or unchecks it as it is clicked; it takes the group's variant where it sets none, and its state. A Label inside it, but outside a checkbox's content, names the group, and a Description describes it. It is disabled as is_disabled says, else as the Fieldset it is in is.

  <Checkbox_group name="interests" default_value=(fun () -> [ "coding" ])>
    <Label>"Interests"</Label>
    <Checkbox value="coding">
      <Checkbox.Content>"Coding"</Checkbox.Content>
    </Checkbox>
  </Checkbox_group>

Kobalte has checkboxes but no group of them: the group is built on Kobalte's checkboxes, each its own Checkbox.Root, which the group checks and is told of.

type group = {
  1. checked : string -> bool;
  2. set : string -> bool -> unit;
  3. variant : unit -> [ `primary | `secondary ] option;
  4. disabled : unit -> bool;
  5. invalid : unit -> bool;
  6. read_only : unit -> bool;
  7. name : unit -> string option;
  8. described_by : unit -> string option;
}

What a group's checkboxes read of it: whether a value is checked, read as it changes; set value on, which checks or unchecks it; the variant they take where they set none; its state; the name they submit with; and the id of its description, which their inputs are described by.

module Context : sig ... end
module Props : sig ... end