diff --git a/src/react/swiper-react.d.ts b/src/react/swiper-react.d.ts index c64404a3d..628f33679 100644 --- a/src/react/swiper-react.d.ts +++ b/src/react/swiper-react.d.ts @@ -17,6 +17,13 @@ interface SwiperProps extends SwiperOptions { */ wrapperTag?: string; + /** + * CSS class name of slides' wrapper + * + * @default 'swiper-wrapper' + */ + wrapperClass?: string; + /** * Get Swiper instance */ diff --git a/src/react/swiper.js b/src/react/swiper.js index d84f5ea6d..455bc5abd 100644 --- a/src/react/swiper.js +++ b/src/react/swiper.js @@ -24,6 +24,7 @@ const Swiper = forwardRef( className, tag: Tag = 'div', wrapperTag: WrapperTag = 'div', + wrapperClass = 'swiper-wrapper', children, onSwiper, ...rest @@ -205,7 +206,7 @@ const Swiper = forwardRef( > {slots['container-start']} - + {slots['wrapper-start']} {renderSlides()} {slots['wrapper-end']} diff --git a/src/solid/swiper-solid.d.ts b/src/solid/swiper-solid.d.ts index f7584f5af..f9692fade 100644 --- a/src/solid/swiper-solid.d.ts +++ b/src/solid/swiper-solid.d.ts @@ -16,6 +16,13 @@ interface SwiperProps extends SwiperOptions { */ wrapperTag?: string; + /** + * CSS class name of slides' wrapper + * + * @default 'swiper-wrapper' + */ + wrapperClass?: string; + /** * Get Swiper instance */ diff --git a/src/solid/swiper.jsx b/src/solid/swiper.jsx index 6a2338a6c..a5e8b8a63 100644 --- a/src/solid/swiper.jsx +++ b/src/solid/swiper.jsx @@ -51,6 +51,7 @@ const Swiper = (props) => { 'ref', 'tag', 'wrapperTag', + 'wrapperClass', ]); const params = createMemo(() => getParams(rest)); @@ -221,7 +222,7 @@ const Swiper = (props) => { {slidesSlots().slots['container-start']} -
+
{slidesSlots().slots['wrapper-start']} {renderSlides()} {slidesSlots().slots['wrapper-end']} diff --git a/src/svelte/swiper.svelte b/src/svelte/swiper.svelte index 1b6cd2c52..afd6d6153 100644 --- a/src/svelte/swiper.svelte +++ b/src/svelte/swiper.svelte @@ -20,6 +20,7 @@ export let tag = 'div'; export let wrapperTag = 'div'; + export let wrapperClass = 'swiper-wrapper'; let containerClasses = 'swiper'; let breakpointChanged = false; @@ -158,7 +159,7 @@ {...restProps} > - +