DevactionUI.Tabs (devaction_ui v0.1.0)

Copy Markdown View Source

Tabs that switch panels without a round trip: variant: :boxed is the pill group, :line the underlined row. A small hook moves the selection with ← → Home End (roving tabindex, aria-selected) and shows the panel of the selected tab. Each tab may carry a count.

The first tab is selected unless one says selected.

Summary

Functions

tabs(assigns)

Attributes

  • id (:string) (required)
  • variant (:atom) - Defaults to :boxed. Must be one of :boxed, or :line.
  • label (:string) (required) - the name of the tab list, for assistive technology.
  • full (:boolean) - the tab list takes the whole width and the tabs share it. Defaults to false.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • tab (required) - Accepts attributes:
    • id (:string) (required)
    • label (:string) (required)
    • count (:any)
    • selected (:boolean)