Slider

<script lang="ts" setup>
import { NNSlider } from "@fronntui/vue";
const slides = [{ id: "1" }, { id: "2" }, { id: "3" }, { id: "4" }];
</script>
<template>
<NNSlider arrows title="Some Slider">
<div v-for="slide in slides" :key="slide.id" class="slide">
{{ slide.id }}
</div>
</NNSlider>
</template>
<style scoped>
.slide {
width: 20rem;
background: var(--nn-color-gray-50);
padding: var(--nn-spacing-7);
border-radius: var(--nn-border-radius-lg);
}
</style>

Props

Name
Type
title
string

Slider title

arrows
boolean

Whether or not to show arrows

maxWidth
string

If set, the slider will be padded

Events

Name
Payload
scroll
{ slide: number; isAtStart: boolean; isAtEnd: boolean }

Fired after the slider has been scrolled

Slots

Name
Payload
default

Place for slides

© 2024  inniti