Skip to content
duxt

Tab group

Tabs for anything that is not code.

::tab-group around ::tab blocks — one panel per tab, keyboard-navigable.

Usage

API

No props. The labels come from the children.

Slots

SlotWhat goes in it
default::tab blocks

Notes

Not ::tabs. The theme's UI kit already registers a Tabs — shadcn's — and two components of one name is not an override a build resolves in your favour: Nuxt keeps one of them, and it kept shadcn's, so ::tabs rendered a primitive with no triggers and no state. A content component may not take a name the UI kit owns.

Built on reka-ui's primitives rather than the shadcn wrapper, because the labels are not known until the children have registered themselves: MDC hands them in as slot content, not as a prop. Keyboard navigation, roving focus and the ARIA roles come with them.

Was this page helpful?