Documentation
¶
Index ¶
- func AlertDialog(parseProps AlertDialogProps) ui.Node
- func Combobox(parseProps ComboboxProps) ui.Node
- func DatePicker(parseProps DatePickerProps) ui.Node
- func Listbox(parseProps ListboxProps) ui.Node
- func Menu(parseProps MenuProps) ui.Node
- func RadioGroup(parseProps RadioGroupProps) ui.Node
- func Table(parseProps TableProps) ui.Node
- type AlertDialogProps
- type ComboboxProps
- type DatePickerProps
- type DialogButton
- type Item
- type ListboxProps
- type MenuProps
- type RadioGroupProps
- type TableColumn
- type TableProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlertDialog ¶
func AlertDialog(parseProps AlertDialogProps) ui.Node
AlertDialog renders a headless alertdialog: role="alertdialog", aria-modal, aria-labelledby/aria-describedby wired to the title/message, and action buttons. Drive open/close from component state and pair with ui.AccessibleOverlay (G10) for focus trap + Esc.
func Combobox ¶
func Combobox(parseProps ComboboxProps) ui.Node
Combobox renders the input/listbox shell expected by screen readers.
func DatePicker ¶
func DatePicker(parseProps DatePickerProps) ui.Node
DatePicker renders a headless grid for one month.
func Listbox ¶
func Listbox(parseProps ListboxProps) ui.Node
Listbox renders a headless listbox with option selection state.
func RadioGroup ¶
func RadioGroup(parseProps RadioGroupProps) ui.Node
RadioGroup renders a headless radio group following the WAI-ARIA radiogroup pattern: role="radiogroup" wrapping role="radio" options with aria-checked / aria-disabled, and a single roving tab stop (tabindex 0 on the checked radio, or the first enabled one when none is selected; all others tabindex -1). Wire arrow-key navigation with ui.UseCompositeNavigation and reflect the active index back through Item.Selected — so Segmented/Swatch/Toggle controls get correct radiogroup semantics without each reimplementing them.
func Table ¶
func Table(parseProps TableProps) ui.Node
Table renders a semantic data table with stable headers and captions.
Types ¶
type AlertDialogProps ¶
type AlertDialogProps struct {
ID string
Title string
Message string
Buttons []DialogButton
OnDismiss func()
}
AlertDialogProps configures a headless WAI-ARIA alert dialog — the themeable, e2e-drivable replacement for window.confirm/alert (G18).
type ComboboxProps ¶
type DatePickerProps ¶
type DialogButton ¶
type DialogButton struct {
ID string
Label string
OnClick func()
// Primary marks the default/confirm action.
Primary bool
}
DialogButton is one action button in a dialog.
type ListboxProps ¶
type ListboxProps struct {
ID string
Label string
ActiveID string
Items []Item
// MultiSelect declares the listbox allows multiple selected options. When true the container
// gets aria-multiselectable="true" — required by WAI-ARIA 1.2 §5.5 so assistive tech announces
// the multi-select mode (per-option aria-selected alone is not enough).
MultiSelect bool
}
type RadioGroupProps ¶
type RadioGroupProps struct {
ID string
Label string
Orientation string // "horizontal" (default) or "vertical"
Items []Item
}
RadioGroupProps configures a headless WAI-ARIA radio group. Mark the chosen option with Item.Selected; Item.Disabled removes it from the tab order.
type TableColumn ¶
type TableProps ¶
type TableProps struct {
ID string
Caption string
Columns []TableColumn
Rows []map[string]string
}