Slider
The Slider component provides a reusable pattern for slider in the interface.
Using the slider item component
Single slide
Repeat slide
Button styling
Slider with Cards
Slider with Segment
API
| Parameter | Default | Description |
|---|---|---|
|
showStepper
|
true | Option to hide or show stepper. |
|
autoSlide
|
true | If set to true, slider will auto slide with default delay. Can also receive an int to set delay in seconds |
|
peekSlides
|
false | Adds some padding to show a peek of next and previous slides |
|
navigationHover
|
true | Only show navigation when hovering over the slider |
|
ratio
|
16:9 | The size ratio of the slider |
|
repeatSlide
|
true | Will allow the slide to repeat its cycle |
|
type
|
slide | - |
|
heroStyle
|
false | - |
|
shadow
|
true | - |
|
customButtons
|
false | False will use default buttons, otherwise pass a string of the value of data-js-slider-buttons |
|
arrowButtons
|
[] | - |
|
padding
|
0 | Sets the amount of padding between slides |
|
gap
|
2 | Sets the amount of gap between slides |
CSS API
| Variable | Default | Type | Values | Description |
|---|---|---|---|---|
|
--c-slider--base
|
var(--base) | range | - | Main unit that drives radius and spacing scales. |
|
--c-slider--border-radius
|
var(--border-radius) | range | - | Border Radius |
|
--c-slider--color--primary
|
var(--color--primary) | color | - | Primary |
|
--c-slider--color--alpha
|
var(--color--alpha) | rgba | - | Used for overlays. Includes opacity — set both color and alpha together. |
|
--c-slider--font-family-heading
|
var(--font-family-heading) | font | - | Falls back to body font if not set. |
|
--c-slider--font-family-base
|
var(--font-family-base) | font | - | Body Font |
|
--c-slider--font-size-100
|
var(--font-size-100) | range | - | Base font size. |
|
--c-slider--color--alpha-contrast
|
var(--color--alpha-contrast) | color | - | Used for text and icons on alpha overlays. |
|
--c-slider--shadow-color
|
var(--shadow-color) | rgba | - | Shadow Color |
|
--c-slider--shadow-amount
|
var(--shadow-amount) | range | - | Multiplier for elevation shadows. 0 = none, 1 = default. |