Installation
Getting Nuxt Splide running takes one step: add the module. Choosing a theme is optional — it defaults to default.
1. Add the module
Section titled “1. Add the module”The quickest way is the Nuxt CLI, which installs the package and adds it to your nuxt.config for you:
npx nuxi@latest module add nuxt-splideManual install
Section titled “Manual install”If you’d rather install it by hand, add the package with your preferred package manager:
# pnpmpnpm add -D nuxt-splide# npmnpm install --save-dev nuxt-splide# yarnyarn add --dev nuxt-splideThen add 'nuxt-splide' to the modules array in nuxt.config.ts:
export default defineNuxtConfig({ modules: ['nuxt-splide'],})2. Pick a theme (optional)
Section titled “2. Pick a theme (optional)”Set a theme under the splide key. The module loads the matching stylesheet automatically — you never import CSS yourself:
export default defineNuxtConfig({ modules: ['nuxt-splide'], splide: { theme: 'default', },})| Theme | Description |
|---|---|
default | Default theme (the default if you set nothing). |
skyblue | Light blue theme. |
sea-green | Green theme. |
core | Unstyled — only the essential layout CSS, so you can style it entirely yourself. |
See Configuration for more on themes and the unstyled core option.
What you get
Section titled “What you get”Once the module is registered, three components are auto-imported across your app — no import statement and no manual component registration:
<Splide>— the slider root, which takes theoptionsprop.<SplideSlide>— wraps each slide.<SplideTrack>— an optional explicit track element, for custom arrow/pagination placement (see Usage).
Next steps
Section titled “Next steps”- Usage — build your first slider with options and events.
- Configuration — themes and the
splideconfig key.