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

Anatomy

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

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

All props accepted by this component, with their type, default value and 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

Content slots exposed by this component.

#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

Events emitted by this component.

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

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

Customisation

CSS variables

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

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

Accessibility

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

ARIA roles

region

Keyboard interactions

Keyboard interactions
KeyAction
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.

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

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 window

vue

Vertical direction

vue

Continuous (wrap-around)

vue

Ecosystem

Family

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