Skip to content

Configuration

Module-level configuration lives under the splide key in nuxt.config.ts. The module has a single option — theme — which controls which stylesheet is loaded globally. Everything about an individual slider’s behavior (type, layout, autoplay, breakpoints) is set per-component via the options prop, not here.

export default defineNuxtConfig({
modules: ['nuxt-splide'],
splide: {
theme: 'default',
},
})
OptionTypeDefaultDescription
theme'default' | 'skyblue' | 'sea-green' | 'core''default'Which Splide stylesheet to load globally.

That’s the whole module surface. The theme you pick determines the bundled CSS the module injects for you, so you never import a Splide stylesheet by hand.

ThemeDescription
defaultThe standard Splide theme — neutral arrows and pagination styling. Used if you set nothing.
skyblueLight blue accent theme.
sea-greenGreen accent theme.
coreUnstyled. Loads only the essential layout CSS Splide needs to function — no arrow/pagination styling — so you can style everything yourself.
export default defineNuxtConfig({
modules: ['nuxt-splide'],
splide: {
theme: 'skyblue',
},
})

These two are easy to mix up:

  • splide in nuxt.config.ts — global, and currently only the theme. It decides which stylesheet is on the page.
  • The options prop on <Splide> — per-slider, the full Splide options object. Two sliders on the same page can have completely different options.
// nuxt.config.ts — global theme
export default defineNuxtConfig({
modules: ['nuxt-splide'],
splide: {
theme: 'core', // unstyled; style sliders yourself
},
})
<!-- a component — per-slider behavior -->
<template>
<Splide :options="{ type: 'loop', perPage: 2 }" aria-label="Looping pair">
<SplideSlide v-for="n in 4" :key="n">
<img :src="`/img-${n}.jpg`" :alt="`Image ${n}`">
</SplideSlide>
</Splide>
</template>
  • Examples — runnable, end-to-end recipes.
  • Usage — the options prop, events, and custom track structure.