TabPanels

Navigation
stable

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

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

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

API

Emits

Événements émis par ce composant.

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

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Interactions clavier

Interactions clavier
ToucheAction
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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic panel container

vue

Swipeable (touch)

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.