Splidejs / splide

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.
https://splidejs.com
MIT License
4.83k stars 418 forks source link

Grid extension doesn't work #1275

Open trompomorsula opened 7 months ago

trompomorsula commented 7 months ago

Checks

Version

v0.6.12

Description

I am trying to make a carousel with grid, with cols and rows. I have followed the steps in the documentation and I can't get it to put the elements in the grid. It works but it doesn't make the grid.

Reproduction Link

No response

Steps to Reproduce

import { Grid } from '@splidejs/splide-extension-grid'

const options = { rewind: true, direction: 'ttb', height: '20rem', perPage: 8, perMove: 1, grid: { rows: 2, cols: 4, gap : { row: '1rem', col: '1.5rem', }, }, };

Expected Behaviour

Captura de pantalla 2024-02-12 a las 16 24 26

wplit commented 6 months ago

You'd be best to provide an example URL where it's going wrong. So people can inspect the page and spot the issue. The grid works when i'm testing it, so likely just something unique to how you're setting it up.