Custom Components
CMS Slider
CMS Slider
Instructions
Overview
Add a responsive, customizable content slider to your website.
Getting Started
Quick Start
- Click the Copy Component button on the top of the page.
- Paste the component into your Webstudio site.
Manual Start
- Add the Script: Copy and paste this code into your website's after the component:
[code-block]<script type="module" src="https://drevo.b-cdn.net/Library/Custom%20Components/CMS%20Slider/cms-slider-v1.1.js"></script>[/code-block]
- Add the Slider Structure: Create a container with the following structure:
Customization Options
Slider Settings
Add these options to the dv-slider
attribute:
loop
/no-loop
= Enable/disable infinite looping (default: no-loop)draggable
/no-draggable
= Enable/disable mouse drag (default: draggable)drag-free
/no-drag-free
= Enable/disable momentum scrolling (default: no-drag-free)align-start
/align-center
/align-end
= Slide alignment (default: center)start-X
= Starting slide index (default: 0)speed-X
= Animation speed in arbitrary units (default: 10)rtl
/ltr
= Direction of slider movement (default: ltr [left-to-right])
Example: dv-slider="loop align-start speed-15 start-1"
Notes
- The component automatically loads the Embla Carousel library
- The component applies minimal styling to allow for custom designs
- Slides can contain any HTML content including images, text, and other components