Skip to content

vishalvxhztl/Splide-POC

Repository files navigation

ViteJS + SplideJS Awesomeness 🚀

Task Location
Circular Progressbar src/components/splide.tsx
Event Handling src/components/splide.tsx and Official Documentation
Import Issue Solution Pull Request
Temporary Import Solution src/vite-env.d.ts

Set up Your Magic ✨

current project node version 21.16.1 [checkout .nvmrc].

git clone https://github.com/vishalvxhztl/Splide-POC.git
cd Splide-POC

if you have nvm install use this command to set node env or install node in your machine.

nvm use
npm install

or

pnpm install

Run Development

npm run dev

or

pnpm run dev

Build Your Project

npm run build
npm run preview

Unleash the Splide Events!

For smooth sailing with React Splide, let's understand the event handling process.

Each splide js event is at your fingertips in react-splide. Just remember to use the on prefix and camelCase the event name.

For example

autoplay:playing -> onAutoplayPlaying

// The first parameter is the event, and the rest of the data can be found in the documentation mentioned above.
onAutoplayPlaying={(event, rate) => {
  console.log(rate); // Ranges from 0 to 1
}}

Note of Caution ⚠️

React Splide and Splide JS Activity Status Discussions

My last checkout date [29/01/2023] 🗓️