Menu

Components

Luna provides accessible UI components following WAI-ARIA Authoring Practices Guide (APG) patterns.

Each component includes:

  • Semantic HTML with proper ARIA attributes

  • Keyboard navigation following APG recommendations

  • BEM class names for consistent styling

  • CSS variables for theming (light/dark mode)

Component Variants

VariantDescription
HeadlessBehavior + attributes only, bring your own DOM
StyledComplete UI with BEM classes and theme CSS

Interactive Demos

ComponentDescription
AccordionExpandable sections
AlertStatus messages with severity levels
CheckboxCheckbox with check/unchecked/indeterminate
DisclosureShow/hide content toggle
MeterValue display in range
RadioSingle selection from options
SpinbuttonNumeric input with buttons
SwitchToggle switches with on/off states
TableSortable data table
TabsTabbed content interface
ToolbarAction button toolbar
Tree ViewHierarchical list navigation

All Components

Styled Components

Complete UI with BEM classes and theme CSS.

ComponentAPG PatternDescription
AccordionAccordionExpandable sections
AlertAlertStatus messages
CheckboxCheckboxTri-state checkbox
DisclosureDisclosureShow/hide content
MeterMeterValue in range
Radio GroupRadio GroupSingle selection
SpinbuttonSpinbuttonNumeric input
SwitchSwitchToggle switch
TableTableData table
TabsTabsTabbed interface
ToolbarToolbarAction toolbar
Tree ViewTree ViewHierarchical data

Headless Components

Behavior + ARIA attributes only. Bring your own styles.

ComponentAPG PatternDescription
AccordionAccordionExpandable sections
AlertAlertStatus messages
BreadcrumbBreadcrumbNavigation trail
ButtonButtonClick actions
CheckboxCheckboxTri-state checkbox
ComboboxComboboxAutocomplete input
DialogDialogModal dialogs
DisclosureDisclosureShow/hide content
LandmarksLandmarksPage regions
LinkLinkNavigation links
ListboxListboxSelectable list
Menu ButtonMenu ButtonDropdown menu
MeterMeterValue in range
Radio GroupRadio GroupSingle selection
SliderSliderRange input
SpinbuttonSpinbuttonNumeric input
SwitchSwitchToggle switch
TableTableData table
TabsTabsTabbed interface
ToolbarToolbarAction toolbar
TooltipTooltipHover info
Tree ViewTree ViewHierarchical data

CSS Variables

All components use these CSS variables for theming:

:root {
  --background: #ffffff;
  --foreground: #1a1a1a;
  --muted: #f7f7f8;
  --muted-foreground: #666666;
  --border: #e5e5e5;
  --accent: #6366f1;
  --accent-foreground: #ffffff;
  --destructive: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
}

See Theme Variables for dark mode and customization.