Blazorise Carousel API

Explore the Blazorise Carousel API reference for parameters, events, methods, and related types.

For examples and usage guidance, see the Carousel documentation.

API

Parameters

Carousel

ParameterDefaultType
Animatedtruebool

Enables the transitions supplied by the CSS provider. Set to false for immediate changes.
AnimationDurationProvider defaultint?

Overrides the provider's animation duration, in milliseconds. Null preserves the provider's default. Zero or a negative value disables transitions.
When omitted, uses the provider CSS transition duration. Animation is disabled when Animated is false.
Autoplaytruebool

Determines whether playback starts automatically.
AutoRepeattruebool

Auto-repeats the carousel slides once they reach the end.
ChildContentnullRenderFragment

Specifies the content to be rendered inside this Carousel.
Crossfadefalsebool

Animate slides with a fade transition instead of a slide.
IndicatorTemplatenullRenderFragment<CarouselIndicatorContext>

Specifies a template for rendering carousel indicators.
Interval2000double

Specifies the interval (in milliseconds) after which the item will automatically slide.
NextButtonLocalizernullTextLocalizerHandler

Function used to handle custom localization for next button that will override a default ITextLocalizer.
NextButtonTemplatenullRenderFragment<CarouselNavigationContext>

Specifies a template for rendering the next navigation button.
PreviousButtonLocalizernullTextLocalizerHandler

Function used to handle custom localization for previous button that will override a default ITextLocalizer.
PreviousButtonTemplatenullRenderFragment<CarouselNavigationContext>

Specifies a template for rendering the previous navigation button.
SelectedSlide—string

Specifies the currently selected slide name.
ShowControlstruebool

Specifies whether to show the controls that allows the user to navigate to the next or previous slide.
ShowIndicatorstruebool

Specifies whether to show an indicator for each slide.
Swipeablefalsebool

Specifies whether horizontal swipe gestures can navigate between slides.
SwipePreventNativeDragtruebool

Specifies whether native browser dragging is prevented while swipe gestures are active.
SwipeThreshold50double

Specifies the minimum swipe distance in pixels.
SwipeTouchActionPanYGestureTouchAction

Specifies the browser touch-action behavior applied while swipe gestures are active.
Possible values:AutoNonePanXPanYManipulation
SwipeVelocityThreshold0.3double

Specifies the minimum swipe velocity in pixels per millisecond.

CarouselSlide

ParameterDefaultType
CaptionnullRenderFragment

Specifies the caption content to be rendered inside this CarouselSlide.
ChildContentnullRenderFragment

Specifies the content to be rendered inside this CarouselSlide.
Intervalnullint?

Specifies the interval (in milliseconds) after which this item will automatically slide.
Name—string

Specifies the slide name.

Events

Carousel

EventType
SelectedSlideChangedEventCallback<string>

Occurs after the selected slide has changed.

Methods

Carousel

MethodReturnParameters
SelectNextTask—

Selects the next slide in a sequence, relative to the current slide.
SelectPreviousTask—

Selects the previous slide in a sequence, relative to the current slide.
SelectTaskstring name

Selects the slide by its name.
SlideIndexintstring slideName

Gets the index of the slide with the specified name.

CarouselSlide

MethodReturnParameters
ActivateTask—

Makes this slide active.