Skip to content

Carousel arrows are cropped on small screens #3813

@jedjebari

Description

@jedjebari

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.2

Reproduction

Here is the code used from the doc :

<script setup lang="ts">
const items = [
  'https://picsum.photos/640/640?random=1',
  'https://picsum.photos/640/640?random=2',
  'https://picsum.photos/640/640?random=3',
  'https://picsum.photos/640/640?random=4',
  'https://picsum.photos/640/640?random=5',
  'https://picsum.photos/640/640?random=6'
]
</script>

<template>
  <UCarousel v-slot="{ item }" arrows :items="items" class="w-full max-w-xs mx-auto">
    <img :src="item" width="320" height="320" class="rounded-lg">
  </UCarousel>
</template>

Display the page in a mobile frame using devtools

Description

Hello
On small screens carousel arrows seem to be outside of the screen.
Using the demo code from the doc in a fresh new project I get this :

Image

Using a max-w-2xs fixes the issue, but is this scenario supposed to be handled by the component itself (ie, should arrows be part of the component width) ?

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions