TabPanels

Navigation
stable

Content container that mirrors the tablist selection — orchestrates OrigamTabPanel children with optional fade transition and swipe support.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamTabPanelsSchematic of the TabPanels container with 3 numbered parts. origam-tab-panel (active) 1 2 3 origam-tab-panels ① root · ② defaults-provider · ③ active origam-tab-panel
Anatomy of <origam-tab-panels> — 3 layers. The root wraps an <OrigamDefaultsProvider> that forwards the transition prop to child panels. Only the active panel is shown; others are v-show-hidden.
1.origam-tab-panels
Root element. Manages the panel group via useGroup and provides transition context via ORIGAM_TAB_PANELS_CTX_KEY.
2OrigamDefaultsProvider (internal)
Internal <OrigamDefaultsProvider> that injects the transition prop into child <OrigamTabPanel> elements without requiring explicit prop drilling.
3.origam-tab-panel--active
The currently visible panel. Inactive panels remain in the DOM via v-show after first mount.

API

Props

All props accepted by this component, with their type, default value and description.

tag
string
'div'
Root HTML element rendered for the panels container.
transition
string | false
'fade'
Transition name applied to <Transition> inside each OrigamTabPanel. Defaults to "fade". Pass false to disable all transitions.
swipeable
boolean
false
Enables horizontal touch swipe to navigate panels (left → next, right → prev) via the v-touch directive.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
direction
TDirection
'horizontal'
Layout direction. horizontal = panels stacked inline; vertical = flex-row with panels side by side.
disabled
boolean
modelValue
any
Value of the currently visible panel. Bind with v-model — must stay in sync with the sibling OrigamTabs v-model.
multiple
boolean
mandatory
boolean
true
When true a panel is always visible (cannot deselect all).
max
number
selectedClass
string

API

Slots

Content slots exposed by this component.

#default
Container for OrigamTabPanel children. Receives group orchestration props for advanced custom panel rendering.

API

Emits

Events emitted by this component.

@update:modelValue
any
Fired when the visible panel changes. Use v-model to bind.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
() => void
Programmatically selects the next panel in registration order.
() => void
Programmatically selects the previous panel in registration order.
(value: any, selected: boolean) => void
Programmatically selects a panel by its registered value.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Vertical padding applied inside the tab panels container.
Horizontal padding applied inside the tab panels container.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Keyboard interactions

Keyboard interactions
KeyAction
Swipe left / rightWhen swipeable=true, horizontal swipe navigates to the next/previous panel.

Notes

  • OrigamTabPanels has no ARIA role of its own — it is a layout orchestrator. ARIA semantics live on each child OrigamTabPanel (role="tabpanel").
  • Keep the v-model in sync with the sibling OrigamTabs v-model. Desynchronised models break the aria-controls / aria-labelledby wiring between tabs and panels.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
dimension
var(--origam-space---4)
Default vertical padding for panel content.
dimension
var(--origam-space---0)
Default horizontal padding for panel content.
duration
var(--origam-motion__duration---fast)
Duration of the fade transition between panels.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic panel container

vue

Swipeable (touch)

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.