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.

Aperçu

Rendu de l’aperçu en cours…

default

Rendu de l’aperçu en cours…

no arrows

Rendu de l’aperçu en cours…

vertical dots

Structure

Anatomie

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

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

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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

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

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

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

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

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

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 carousel

vue

Auto-play with progress

vue

Custom slide content

vue

Écosystème

Famille

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