Slider with SwipeJS
Documentation
Scripts import for WPCodeBox
Admin CSS in functions.php
Add this to functions.php for a better Gutenberg experience:
function runbot_splide_slider_block_editor_css() {
$custom_css = "
.splide{
border:2px solid grey;
}
.splide__list{
display: flex;
width: 100%;
overflow-x: scroll;
flex-wrap: nowrap;
}
.splide__slide{
flex-shrink: 0;
width: 640px;
max-width: 100%;
height: 100%;
}
";
wp_add_inline_style('wp-edit-blocks', $custom_css);
}
add_action('enqueue_block_editor_assets', 'runbot_splide_slider_block_editor_css');