ui/disclosure_group
Types
Keyboard messages for disclosure group component.
pub type Msg {
Toggle
MoveNext
MovePrev
MoveFirst
MoveLast
}
Constructors
-
ToggleToggle the currently focused disclosure (Enter or Space)
-
MoveNextMove to next disclosure (ArrowDown or ArrowRight)
-
MovePrevMove to previous disclosure (ArrowUp or ArrowLeft)
-
MoveFirstMove to first disclosure (Home)
-
MoveLastMove to last disclosure (End)
Values
pub fn disclosure_group(
attributes: List(attribute.Attribute(a)),
children: List(element.Element(a)),
) -> element.Element(a)
pub fn disclosure_trigger_element_id(index: Int) -> String
Get the element ID for a disclosure trigger at the given index.
pub fn keymap(key_event: keyboard.KeyEvent) -> option.Option(Msg)
Keymap for disclosure group keyboard navigation. Follows WAI-ARIA accordion pattern:
- ArrowDown/ArrowRight: Move to next disclosure
- ArrowUp/ArrowLeft: Move to previous disclosure
- Home: Move to first disclosure
- End: Move to last disclosure
- Enter/Space: Toggle the currently focused disclosure
pub fn size(s: Size) -> attribute.Attribute(a)
pub fn variant(v: Variant) -> attribute.Attribute(a)