Replies: 1 comment 1 reply
-
The useEffect( () => {
if ( ref.current ) {
const { root, track, list } = ref.current.splide.Components.Elements;
// root element
root.classList.add( 'your-class' );
// track element
track.classList.add( 'your-class' );
// list element
list.classList.add( 'your-class' );
}
} ); However, modifying styles of core elements may break your slider. Please be careful! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Is there any chance we could have more class options to pass down to
classes
?Today, we can extend the arrows and pagination elements with css classes, but we can't pass down classes to other parts of the slider like the track or root elements.
Example:
In my project, my slider needs to have the following layout
Which can only be achieved at the moment by directly overriding
splide__track
'soverflow
property tovisible
on my CSS. It would be interesting if we could alter those elements the same way we do with arrows and pagination.Thanks for the great component!
Beta Was this translation helpful? Give feedback.
All reactions