Slide
Horizontally scrollable slide group with drag scroll, keyboard navigation and optional arrow controls.
Structure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<origam-slide-group> — 4 internal parts: root container ①, prev affix ②, scrollable container ③, next affix ④.- 1.origam-slide-group
- Root flex container. Clips overflow to hide off-screen items.
- 2.origam-slide-group__prev
- Previous arrow affix. Rendered only when showArrows is active. Hosts the #prev slot or a default OrigamIcon.
- 3.origam-slide-group__container
- Scrollable viewport. overflow: hidden with scroll event handling for arrow state.
- 4.origam-slide-group__next
- Next arrow affix. Rendered only when showArrows is active. Hosts the #next slot or a default OrigamIcon.
API
Props
All props accepted by this component, with their type, default value and description.
- centerActivebooleanfalse
- When true, the active item is scrolled to the center of the container.
- Icon for the "next" navigation arrow.
- Icon for the "previous" navigation arrow.
- showArrowsboolean | 'always'false
- Controls arrow visibility. false = hidden, true = shown when needed, 'always' = always visible.
- tagstring'div'
- HTML element rendered at the root.
- Scroll axis. horizontal (default) or vertical.
- modelValuestring | number | string[] | number[]
- The currently selected item value (or array for multi-select). Synced via v-model.
- multiplebooleanfalse
- Allows multiple items to be selected simultaneously.
- displayLevel
- Responsive breakpoint below which the component is hidden.
- borderboolean | stringfalse
- Applies a border to the slide group container.
- rounded
- Border-radius token or boolean.
API
Slots
Content slots exposed by this component.
- #default
- Container for slide items. Slot props expose selection helpers for child items.
- #prev
- Replaces the previous arrow button with custom content.
- #next
- Replaces the next arrow button with custom content.
API
Emits
Events emitted by this component.
- @update:modelValuestring | number | string[] | number[]
- Emitted when the selected item changes. Syncs with v-model.
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.
- 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.
- Root display mode.
- Root overflow clipping.
- Scroll animation duration.
- Minimum width of the prev/next arrow affixes.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
Keyboard interactions
| Key | Action |
|---|---|
| Arrow Left / Right | Moves focus between items inside the scroll container. |
| Tab | Focuses the slide group container, then Tab moves through items. |
| Home / End | Jumps focus to the first or last item. |
Notes
- The scroll container is keyboard-accessible. Arrow keys trigger programmatic scrollTo calls for cross-browser scroll support.
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.
- otherflex
- Root display mode.
- otherhidden
- Root overflow.
- duration{motion.duration.medium}
- Scroll transition duration.
- dimension52px
- Minimum width of the prev/next arrow affixes.
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 slide group
With selection
Always show arrows