vue3-carousel 0.19.0 adds a marquee, native scroll-snap mode and nine fixes

1 hour ago

vue3-carousel version 0.19 gives a carousel two new ways to move: a marquee that scrolls on its own, and a native CSS mode where the browser does the scrolling. It adds six more props and nine fixes. Three of the fixes change behaviour your tests might notice.

Ask about this presentation

Chapters

  1. 0:00vue3-carousel 0.19.0
  2. 0:18Marquee mode
  3. 0:36Native CSS mode
  4. 0:59adaptiveHeight and disableWhenSlidesFit
  5. 1:21classPrefix
  6. 1:43keyboardNavigation and autoScrollOnFocus
  7. 2:00Nine fixes
  8. 2:20What behaves differently
  9. 2:43Upgrade to 0.19.0
Show transcript
  1. vue3-carousel version 0.19 gives a carousel two new ways to move: a marquee that scrolls on its own, and a native CSS mode where the browser does the scrolling. It adds six more props and nine fixes. Three of the fixes change behaviour your tests might notice.

    Slide text

    vue3-carousel 0.19.0

    adds a marquee, native scroll-snap mode and nine fixes

    Six more props, and three fixes your tests may notice.

    vue3-carousel logo
    Release 0.19.0
  2. Turn on marquee and the slides scroll continuously in a seamless loop, like a ticker. Marquee speed sets the pace in pixels per second, and defaults to 60. While it runs, navigation, pagination, drag and v-model are inactive, and it pauses on keyboard focus.

    Slide text

    Turn on marquee and the slides scroll like a ticker0.19.0

    1
    2
    3
    4
    5
    6
    7
    8
    1
    2
    3
    4
    5
    6
    7
    8
    marquee :marquee-speed="80"
    80 px per second
    default: 60 px per second
    Navigation, pagination, drag, wheel and v-model are off · pauses on keyboard focus
    New modes
  3. Native CSS mode makes the viewport a scroll-snap container, so the browser handles scrolling, touch and momentum, while navigation, pagination and v-model keep working. Wrap around, fade and edge spacing turn off, and mouse drag won't scroll it, so add navigation or pagination for mouse users. Without scroll snap support, it falls back to the regular mode.

    Slide text

    nativeCss lets the browser scroll and snap the slides0.19.0

    <Carousel :native-css="true" :items-to-show="2.5" :gap="10" snap-align="start">
    1
    2
    3
    4
    5
    6
    Turned off: wrapAround, fade, edgeSpacing, mouse drag
    Add Navigation or Pagination for mouse users
    No scroll-snap support? It falls back to the regular JS mode, and isNative reports which one runs.
    New modes
  4. For galleries with mixed image sizes, adaptive height sizes the carousel to the tallest visible slide and animates the height as you navigate. Disable when slides fit locks a carousel whose slides are all on screen. Navigation and pagination disappear, sliding stops, and it unlocks by itself when a resize or a breakpoint changes the fit.

    Slide text

    Fit the height to the visible slides, or lock a carousel that already fits

    adaptiveHeight
    1
    2
    3
    disableWhenSlidesFit
    1
    2
    3
    No arrows, no pagination, no sliding
    Adds the is-locked class
    New props
  5. If the carousel class names collide with other styles on your page, set class prefix, and vc track replaces carousel track everywhere. The bundled stylesheet still targets the default name, so a custom prefix leaves the carousel unstyled until you load a copy with your prefix swapped in. The docs give a one-line sed command for it.

    Slide text

    Rename every class with classPrefix 0.19.0

    <Carousel class-prefix="vc">
    carousel → vc
    carousel__track → vc__track
    carousel__slide--active → vc__slide--active
    Bundled carousel.css still targets .carousel · load a copy with your prefix:
    sed 's/\.carousel/.vc/g' node_modules/vue3-carousel/dist/carousel.css > src/vc-carousel.css
    New props
  6. Two new switches, both on by default, decide what the keyboard does. Turn off keyboard navigation and the arrow keys stop moving the carousel. Turn off auto scroll on focus and keyboard focus stops sliding the carousel to a slide, which helps when slide links open another page.

    Slide text

    Two switches decide what the keyboard moves

    :keyboard-navigation="false"
    Arrow keys stop moving the carousel. Navigation buttons still work.
    :auto-scroll-on-focus="false"
    Keyboard focus stops sliding the carousel. For slide links that open another page.
    New props
  7. The drag threshold now works on short swipes, and a drag that keeps the same slide animates back instead of jumping. Paging by items to scroll works from the edges, and v-model takes the short way around the loop. Off-screen slide content leaves the tab order, and every carousel gets its own region label.

    Slide text

    Nine fixes for drag, paging and screen readers

    Drag
    threshold works on short swipes
    A drag that keeps the slide animates back
    Guards for zero-sized slides with wrapAround
    Navigation
    itemsToScroll pages correctly from the edges
    v-model loops the short way with wrapAround
    A new slideTo ends the slide it interrupts
    Prev/next clicks respect the sliding guard
    Accessibility
    Off-screen slide content leaves the tab order
    Each carousel gets its own region label
    Fixes
  8. The default region label is now Gallery plus an instance id. If you translate it, keep the id placeholder, or give each carousel a meaningful label. A next or previous click, or an arrow key, during a slide is now ignored; only calling slide to with skip transition can interrupt it. And focusable content in off-screen slides gets a tab index of minus one.

    Slide text

    Three fixes your tests may notice after you upgrade

    Default region label
    "Gallery" → "Gallery {id}"
    Arrow key or prev/next click mid-slide
    starts another slide → ignored, unless slideTo(index, true)
    Off-screen links and buttons
    tabbable → tabindex="-1" until visible
    Upgrade
  9. Upgrade when you're ready, and check those three changes first if your tests read the Gallery label or press arrow keys mid-slide. The docs are now also published as Markdown for AI agents, at llms.txt and llms-full.txt. That's vue3-carousel 0.19: a marquee, native scroll snap, and nine fixes.

    Slide text
    vue3-carousel logo

    Check the three new defaults first if your tests read the region label or press arrow keys mid-slide.

    Docs for AI agents: llms.txt and llms-full.txt
    github.com/ismail9k/vue3-carousel/releases/tag/v0.19.0
    Upgrade

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️