Window

Navigation
stable

Slide-based content switcher with previous/next navigation, touch swipe, keyboard support and configurable transitions. The base for Carousel, Stepper and Tab panels.

Structure

Anatomie

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

Anatomy of OrigamWindowSchematic of the Window component with 5 numbered internal parts. WindowItem content ‹ › 1 2 3 4 5 ④ prev and ⑤ next rendered when showArrows is set
Anatomy of <origam-window> — 5 internal parts. The root ① wraps the container ② which holds the active WindowItem ③. Prev ④ and next ⑤ arrow buttons overlay the container sides.
1.origam-window
Root element. position: relative; overflow: hidden. Receives tag, rounded, elevation and bgColor.
2.origam-window__container
Inner flex column. display: flex; flex-direction: column; height: inherit. Hosts the #default slot (WindowItem children).
3origam-window-item
Each slide — rendered inside OrigamWindowItem. Only the active item is visible; transitions are handled by OrigamTransition wrapping each item.
4.origam-window__controls [prev]
Previous arrow button. Absolute-positioned on the left/top edge. Hidden when showArrows=false or canMoveBack=false.
5.origam-window__controls [next]
Next arrow button. Absolute-positioned on the right/bottom edge.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

continuous
boolean
false
When true, the prev/next navigation wraps around (first ↔ last).
nextIcon
'mdi-chevron-right'
Icon for the next button. Override for custom iconography.
prevIcon
'mdi-chevron-left'
Icon for the prev button.
reverse
boolean
false
Reverses the slide direction. Useful for RTL or countdown-style sequences.
showArrows
string | boolean
false
Controls arrow visibility: false=hidden, true=always shown, "hover"=shown on hover.
touch
boolean | ITouchHandlers
true
Enable touch swipe to navigate. Pass an ITouchHandlers object to override left/right/up/down handlers.
modelValue
any
v-model for the currently active slide. Matches the value prop of the active WindowItem.
disabled
boolean
false
Disables navigation (arrows and keyboard). The active slide remains visible.
selectedClass
string
'origam-window-item--active'
CSS class applied to the currently active WindowItem.
mandatory
boolean
false
When true, always keeps at least one item selected (deselect is not allowed).
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
direction
'horizontal'
Slide animation axis: horizontal (default) or vertical.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
Border-radius token applied to the window wrapper.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
Box-shadow elevation applied to the window wrapper.
bgColor
Background color applied to the arrow buttons.
hover
boolean | IStateEffectConfig
false
Forces the hover state on the arrow buttons.
hoverClass
string
active
boolean | IStateEffectConfig
false
Forces the active state (forwarded to arrow buttons).
activeClass
string

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Slide content. Place OrigamWindowItem children here. Receives the group provide context.
#arrows
Full replacement for both prev and next buttons. Receives the bound props and canMove flags.
#prev
Replaces only the previous button. Receives bound props and canMove boolean.
#next
Replaces only the next button.
#additional
Slot rendered after the container (outside the slide stack). Useful for indicator dots or progress bars that must not clip with the content.

API

Emits

Événements émis par ce composant.

@update:modelValue
any
Fired when the active slide changes.

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.
GroupProvide
Group selection context provided to all WindowItem children. Used to wire the active state.
Ref<string>
Reactive CSS string for computed styles.
string
Unique style-sheet ID.
() => void
Injects the style sheet on mount.
() => void
Removes the style sheet on unmount.
Ref<boolean>
True once the style sheet has been injected.

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.

Overflow of the root element (hidden to clip exiting slides).
Slide transition duration.
Easing function for slide transitions.
Icon color of the arrow buttons.
Arrow button icon color on hover.

Inclusion

Accessibilité

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

Rôles ARIA

region

Interactions clavier

Interactions clavier
ToucheAction
ArrowLeft / ArrowRightNavigate to the previous/next slide when direction="horizontal".
ArrowUp / ArrowDownNavigate to the previous/next slide when direction="vertical".
TabMoves focus through arrow buttons and content inside the active slide.

Notes

  • Consider adding role="region" and aria-label to the window to make the slide region identifiable to screen readers.
  • Arrow buttons are OrigamBtn with icon props — always provide aria-label (e.g. "Previous slide", "Next slide") via the prevProps/nextProps slots.
  • For auto-advancing windows (e.g. carousel), add aria-live="polite" on the active slide container so screen readers announce the new content.

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---slow)
Slide transition duration.
cubicBezier
var(--origam-motion__easing---standard)
Slide transition easing.
color
var(--origam-color__text---primary)
Arrow button icon color.

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 window

vue

Vertical direction

vue

Continuous (wrap-around)

vue

Écosystème

Famille

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