Skip to content
daisyBlazor

Carousel

A CSS scroll-snap carousel: CarouselItems scroll sideways (or up and down with Vertical) and snap into place, with no JavaScript.
Data display.carousel
Cover · <Carousel>
Release highlights swipe →

Examples

Basic

Items keep their natural width and snap to the start.

website/Examples/DataDisplay/CarouselBasicExample.razor Source

Snap and width

Snap centres each stop; Width sizes the items so the next one peeks in.

website/Examples/DataDisplay/CarouselSnapExample.razor Source

Vertical

Vertical stacks the items and scrolls up and down; give the carousel a height.

website/Examples/DataDisplay/CarouselVerticalExample.razor Source

API

DaisyBlazor

Parameters

  • Snap CarouselSnap
    = CarouselSnap.None

    Scroll-snap alignment for carousel items. None (default), Center, or End.

  • Vertical bool
    = false

    When true renders a vertical carousel (.carousel-vertical); horizontal by default.

  • Class string
    = null

    Extra CSS classes merged onto the root element.

  • Style string
    = null

    Inline CSS styles applied to the root element.

Content

  • ChildContent RenderFragment

    Child content; should consist of CarouselItem components.

<CarouselItem>

DaisyBlazor

Parameters

  • Width string
    = null

    CSS width for the item (e.g. "100%", "300px"); applied as inline style.

  • Class string
    = null

    Extra CSS classes added to the carousel item.

  • Style string
    = null

    Inline CSS style appended after the width.

Content

  • ChildContent RenderFragment

    Child content rendered inside the carousel item.

Something went wrong while running the docs. Reload