TabPanel

Navigation
stable

A single tab content panel — lazy-mounted by default until first activated, then kept alive via v-show.

Structure

Anatomie

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

Anatomy of OrigamTabPanelSchematic of the TabPanel component with 2 numbered internal parts. #default slot content 1 2 origam-tab-panel ① = role="tabpanel" · tabindex=0 · aria-labelledby; ② = lazy #default slot
Anatomy of <origam-tab-panel> — 2 parts. The root carries role="tabpanel" and aria-labelledby pointing to the sibling tab; the slot content is lazy-mounted on first activation.
1.origam-tab-panel
Root element. Carries role="tabpanel", tabindex="0" and aria-labelledby pointing to the matching tab id. Hidden via v-show when inactive.
2#default slot
Slot content area. Lazy-mounted on first activation via useLazy — renders only after the panel becomes selected for the first time.

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 panel container.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
value
any
Canonical identifier for this panel. Must match the value prop on the sibling OrigamTab.
disabled
boolean
false
Prevents this panel from being selected via the group.
selectedClass
string
'origam-tab-panel--active'
CSS class added to the panel root when it is the active selection.
eager
boolean
false
When true the slot content is mounted immediately (SSR / preload). When false (default) content is only mounted on first activation.

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Panel content. Lazy-mounted on first activation (unless eager=true). Kept alive via v-show after first mount.

API

Emits

Événements émis par ce composant.

@group:selected
{ value: boolean }

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.
Ref<string>
Reactive CSS string generated by useStyle from the computed panel styles.
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 to each tab panel via the parent OrigamTabPanels.
Horizontal padding applied to each tab panel via the parent OrigamTabPanels.
Duration of the fade transition when switching panels.
Outline color shown on focus-visible for the panel container.

Inclusion

Accessibilité

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

Rôles ARIA

tabpanel

Interactions clavier

Interactions clavier
ToucheAction
TabMoves focus into the panel content from the tablist.
Shift + TabReturns focus to the active tab in the tablist.

Notes

  • OrigamTabPanel sets role="tabpanel" and aria-labelledby pointing to the sibling tab DOM id automatically. No manual ARIA needed.
  • Content is not in the DOM until the panel is first activated (unless eager=true). Screen readers only perceive the content after it is mounted.
  • Inactive panels use v-show (not v-if) after first mount, so content remains in the DOM. Assistive technologies may still reach it via search — the v-show="false" (display: none) does hide it from AT per ARIA spec.

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
duration
var(--origam-motion__duration---fast)
Duration of the fade transition when switching 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.

Sous-partie interne : elle est injectée par son composant parent et ne peut pas se rendre seule. Voir la fiche du composant parent pour un exemple vivant.

Rendu de l’aperçu en cours…

Usage

Exemples

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

Lazy panels

vue

Écosystème

Famille

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