Skip to main content

<SliderBarLine/>

This a customizable scrollbar for the slider.

Import

import {SliderBarLine} from "react-scroll-snap-anime-slider";

Usage

<SliderBarLine
id="my-slider-bar-line"
className="my-class-name"
aria-label="slider bar line"
trackProps={{
id: "my-slider-bar-track",
"aria-label": "slider track",
}}
thumbProps={{
id: "my-slider-bar-thumb",
"aria-label": "slider thumb",
}}
style={{ padding: "0 10px" }}
/>

Props

NameTypeRequiredDefaultDescription
Any DIV PropsReact.HTMLAttributes<HTMLDivElement>NoDIV Element props
trackPropsReact.HTMLAttributes<HTMLDivElement>NoProps to the track DIV
thumbPropsReact.HTMLAttributes<HTMLDivElement>NoProps to the thumb DIV

CSS

You can override the default style by using these class names.

Rule NameDescription
.rssas-slider-barFor bar wrapper
.rssas-slider-bar-trackFor track
.rssas-slider-bar-thumbFor thumb