Carousel

Data Display
stable

Sliding window component for cycling through a set of items, with pagination dots, optional progress bar, auto-play interval and keyboard navigation.

Preview

Rendering the live preview…

default

Rendering the live preview…

no arrows

Rendering the live preview…

vertical dots

Structure

Anatomy

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

Anatomy of OrigamCarouselSchematic of the Carousel component with 5 numbered internal parts. Slide content (#default slot) ‹ › 1 2 3 4 5 ⑤ progress bar is absolutely positioned at top; ② controls strip sits at bottom
Anatomy of <origam-carousel> — 5 internal parts.
1.origam-carousel
Root element. Delegates slide rendering to an inner OrigamWindow.
2.origam-carousel__controls
Absolute strip at the bottom. Contains the delimiter (dot) buttons. Hidden when hideDelimiters=true.
3.origam-carousel__controls-item
One pagination dot — an OrigamBtn rendered per slide. Gets --active modifier when its slide is selected.
4.origam-carousel__controls-item--active
BEM modifier applied to the active dot. Icon opacity rises from 0.5 to 1.
5.origam-carousel__progress
Absolute strip at the top. Wraps OrigamProgressLinear. Visible only when progress=true.

API

Props

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

cycle
boolean
false
Enables automatic slide cycling. Uses the interval prop to control timing.
delimiterIcon
'mdi-circle'
Icon rendered inside each pagination dot button.
hideDelimiters
boolean
false
Hides the pagination dot bar entirely.
hideDelimiterBackground
boolean
false
Removes the semi-transparent background from the pagination dot strip.
interval
number | string
6000
Auto-play interval in milliseconds. Only active when cycle=true.
progress
boolean
false
Displays a thin progress bar at the top that fills over the interval duration. Resets on each slide change.
verticalDelimiters
boolean | TInline
false
Renders the pagination dots vertically on the left or right edge.
continuous
boolean
true
Allows wrapping around from the last item to the first and vice versa.
nextIcon
TIcon
prevIcon
TIcon
reverse
boolean
showArrows
string | boolean
true
Shows prev/next navigation arrows. Pass 'hover' to show only on pointer hover.
touch
boolean | ITouchHandlers
modelValue
any
Currently active slide value. Use with v-model for two-way binding.
disabled
boolean
selectedClass
string
mandatory
boolean
true
Keeps at least one slide selected at all times.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
direction
TDirection
'horizontal'
Slide transition direction. horizontal 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
rounded
boolean | number | string | TRounded | null | undefined
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
bgColor
Background color applied to the pagination dot strip (controls area).
hover
boolean | IStateEffectConfig
Surface applied to pagination dots on pointer hover.
hoverClass
string
active
boolean | IStateEffectConfig
Surface applied to the active pagination dot. Pass an object for customised state styling.
activeClass
string
color
Active dot color intent.
height
number | string
500
Height of the carousel in pixels or a CSS length.
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Explicit width override.

API

Slots

Content slots exposed by this component.

#default
Container for OrigamCarouselItem elements. Receives group context from OrigamWindow.
#additional
Renders after the slide content area. By default contains the pagination dots and progress bar. Replace to take full control.
#item
Replaces all pagination dot buttons at once. Receives props (bind to trigger), item and index.
#item.{index}
Replaces the pagination dot at position {index}. Useful for custom per-slide indicators.
#progress
Replaces the auto-play progress bar. Receives percent (0–100).
#play-pause
#prev
Replaces the previous-slide arrow button.
#next
Replaces the next-slide arrow button.
#arrows
Replaces both navigation arrows in one go. Useful to lay them out differently.

API

Emits

Events emitted by this component.

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

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.
Ref<string>
Reactive CSS string generated by useStyle from the computed carousel 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.

Customisation

CSS variables

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

Overflow mode of the carousel root.
CSS position of the root element.
Root width.
Background of the pagination dots strip.
Height of the controls strip.
Z-index of the controls strip, ensuring it renders above slide content.
Default icon opacity inside a pagination dot.
Icon opacity inside the active pagination dot.
Top offset of the progress bar. Set to auto and provide bottom to move it.

Inclusion

Accessibility

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

ARIA roles

region

Keyboard interactions

Keyboard interactions
KeyAction
ArrowLeft / ArrowRightNavigates to the previous or next slide when focused on the carousel.
TabMoves focus through pagination dots and navigation arrows.
Enter / SpaceActivates the focused pagination dot or arrow button.

Notes

  • Each pagination dot receives aria-label="Slide N of M" via useLocale t() — screen readers announce position.
  • Auto-play is suppressed when prefers-reduced-motion: reduce is detected (prefersReducedMotion() check on mount).
  • The slide timer is cleared on unmount and restarted on modelValue change, but there is no explicit pause-on-focus — consider disabling cycle for keyboard-heavy contexts.

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
color
rgba(0, 0, 0, 0.4)
Dot strip background. Transparent when hideDelimiterBackground=true.
dimension
50px
Height of the pagination dot strip.
number
var(--origam-opacity---50)
Icon opacity inside inactive dots.
number
var(--origam-opacity---100)
Icon opacity inside the active dot.
duration
var(--origam-motion__duration---slow)
Slide transition duration.

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 carousel

vue

Auto-play with progress

vue

Custom slide content

vue

Ecosystem

Family

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