I am using vue-vite with typescript, when copy and pasting the code
from https://www.shadcn-vue.com/docs/components/carousel.html it shows something
like this
Does somebody has an idea of why it does not work, or where might be the source of the problem :[
<script setup lang="ts">
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from '@/components/ui/carousel'
import { Card, CardContent } from '@/components/ui/card'
</script>
<template>
<Carousel class="relative w-full max-w-xs">
<CarouselContent>
<CarouselItem v-for="(_, index) in 5" :key="index">
<div class="p-1">
<Card>
<CardContent class="flex aspect-square items-center justify-center p-6">
<span class="text-4xl font-semibold">{{ index + 1 }}</span>
</CardContent>
</Card>
</div>
</CarouselItem>
</CarouselContent>
<CarouselPrevious />
<CarouselNext />
</Carousel>
</template>
this is the code that i copy and pasted from the page
New contributor
Juan Hernández is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.