Fulldev UI

Native Liquid carousel with readable CSS and shared data-slot parts.

Installation

npx shadcn@latest add https://ui.full.dev/r/liquid/carousel.json https://ui.full.dev/r/liquid/card.json

Follow the one-time layout setup. A full components install already includes this item.

Usage

After this install, render these once in the layout head before theme overrides and other modules. The full ui hook already includes them. The command also installs the parts used in this example.

{% render 'ui-init' %}
{% render 'ui-button' %}
{% render 'ui-runtime' %}
{% render 'ui-carousel' %}
{% render 'ui-aspect-ratio' %}
{% render 'ui-card' %}

The preview and its Usage tab render the same native Liquid source. Use data-slot for parts, data-variant for variants and data-size for sizes. Keep your store’s labels, translations and Shopify data in your theme.

The second carousel is a product gallery: one slide at a time with carousel-indicator thumbnails. Give its root data-slides='single', so only the shown slide is exposed to the keyboard and screen readers; without it, every slide that is in view is, as in a row of cards. Give each indicator the zero-based data-index of its slide; the controller scrolls to that slide on click and marks the current one with aria-current. The index counts scroll positions, which are the slides when one shows at a time; an indicator without a position is hidden. Give it a width and an aspect ratio; an image inside fills it. Make an indicator a link to its slide’s id so it also works without JavaScript; once the runtime runs, a plain click scrolls the carousel without moving the page. To show a variant’s image, send carousel:set with its index: root.dispatchEvent(new CustomEvent('carousel:set', { detail: { index } })).

Parts

carousel, carousel-content, carousel-item, carousel-indicator.

Component source · Theming