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
| Parameter | Description | Type | Default |
|---|---|---|---|
Autoplay |
Determines whether playback starts automatically. |
bool | false |
AutoRepeat |
Auto-repeats the carousel slides once they reach the end. |
bool | false |
ChildContent |
Specifies the content to be rendered inside this Carousel. |
RenderFragment | null |
Crossfade |
Animate slides with a fade transition instead of a slide. |
bool | false |
IndicatorTemplate |
Specifies a template for rendering carousel indicators. |
RenderFragment<CarouselIndicatorContext> | null |
Interval |
Specifies the interval (in milliseconds) after which the item will automatically slide. |
double | 2000 |
NextButtonLocalizer |
Function used to handle custom localization for next button that will override a default ITextLocalizer. |
TextLocalizerHandler | null |
NextButtonTemplate |
Specifies a template for rendering the next navigation button. |
RenderFragment<CarouselNavigationContext> | null |
PreviousButtonLocalizer |
Function used to handle custom localization for previous button that will override a default ITextLocalizer. |
TextLocalizerHandler | null |
PreviousButtonTemplate |
Specifies a template for rendering the previous navigation button. |
RenderFragment<CarouselNavigationContext> | null |
SelectedSlide |
Specifies the currently selected slide name. |
string | |
ShowControls |
Specifies whether to show the controls that allows the user to navigate to the next or previous slide. |
bool | true |
ShowIndicators |
Specifies whether to show an indicator for each slide. |
bool | true |
Swipeable |
Specifies whether horizontal swipe gestures can navigate between slides. |
bool | false |
SwipePreventNativeDrag |
Specifies whether native browser dragging is prevented while swipe gestures are active. |
bool | true |
SwipeThreshold |
Specifies the minimum swipe distance in pixels. |
double | 50 |
SwipeTouchAction |
Specifies the browser touch-action behavior applied while swipe gestures are active. Possible values: |
GestureTouchAction | GestureTouchAction.PanY |
SwipeVelocityThreshold |
Specifies the minimum swipe velocity in pixels per millisecond. |
double | 0.3 |
CarouselSlide
| Parameter | Description | Type | Default |
|---|---|---|---|
Caption |
Specifies the caption content to be rendered inside this CarouselSlide. |
RenderFragment | null |
ChildContent |
Specifies the content to be rendered inside this CarouselSlide. |
RenderFragment | null |
Interval |
Specifies the interval (in milliseconds) after which this item will automatically slide. |
int? | null |
Name |
Specifies the slide name. |
string |
Events
Carousel
| Event | Description | Type |
|---|---|---|
SelectedSlideChanged |
Occurs after the selected slide has changed. |
EventCallback<string> |
Methods
Carousel
| Method | Description | Return | Parameters |
|---|---|---|---|
SelectNext |
Selects the next slide in a sequence, relative to the current slide. | Task | |
SelectPrevious |
Selects the previous slide in a sequence, relative to the current slide. | Task | |
Select |
Selects the slide by its name. | Task | string name |
SlideIndex |
Gets the index of the slide with the specified name. | int | string slideName |
CarouselSlide
| Method | Description | Return | Parameters |
|---|---|---|---|
Activate |
Makes this slide active. | Task |