Because images can take a few seconds to load (or not at all), use the image
container to specify a precisely sized container so that your layout isn't broken because of image loading or image errors - Bulma image.
Carousel
A Slideshow for cycling images in confined spaces
# Custom
Slide 1
A link that goes to arrow
# Arrow
# Progress
# Indicator
Some source by Picsum and Images from Unsplash.
# Custom Indicators
When there are more than 6 images, add
If you want custom indicator to stay big, use
indicator-custom
If you want custom indicator to stay big, use
is-medium
on indicator-custom-size
# Switch like a gallery
You may also want to add the is-clipped
modifier to a containing element (usually html
) to stop scroll overflow.
# Carousel List
An imposing carousel list to showcase viewer something.
# Custom With Card
# Custom As indicators
With Breakpoint and Switch like a Gallery.
# API
Carousel
Name | Description | Type | Values | Default |
---|---|---|---|---|
v-model | Binding value | Number | — | 0 |
animated | Transition effect | String | fade , slide | slide |
interval | Interval of the autoplay , in milliseconds | Number | — | 3500 |
has-drag | Toggle touch dragging, when touch not detected. Auto switch mouse dragging | Boolean | — | true |
autoplay | Whether to automatically loop the slides | Boolean | — | true |
pause-hover | Pause carousel when autoplay and mouse enter | Boolean | — | true |
pause-info | Show information about pause when autoplay and pause-hover | Boolean | — | true |
pause-info-type | Type (color) of the pause-info, optional | String | is-white , is-black , is-light ,
is-dark , is-primary , is-info , is-success ,
is-warning , is-danger ,
and any other colors you've set in the $colors list on Sass | is-white |
pause-text | Text when pause | String | — | Pause |
arrow | Display the "next" and "prev" action | Boolean | — | true |
arrow-hover | Display the "next" and "prev" action when hover, but hidden on mobile | Boolean | — | true |
repeat | Controls whether the carousel loops around at the start and end | Boolean | — | true |
icon-pack | Icon pack to use | String | mdi , fa , fas , far , fab , fad , fal | mdi |
icon-size | Arrow icon size, optional | String | is-small , is-medium , is-large | — |
icon-prev | Icon to use for previous arrow | String | — | chevron-left |
icon-next | Icon to use for next arrow | String | — | chevron-right |
indicator | Display the indicator for jumping to specific item | Boolean | — | true |
indicator-background | Adds background to indicator | Boolean | — | false |
indicator-custom | Use when there are more than 6 images so that the indicator is not too small | Boolean | — | false |
indicator-custom-size | Image size of the indicator when the indicator-custom is used | String | is-small , is-medium | is-small |
indicator-inside | Display the indicator inside the carousel | Boolean | — | true |
indicator-mode | Trigger for action indicator | String | click , hover | click |
indicator-position | Position indicator only when indicator-inside | String | is-bottom , is-top | is-bottom |
indicator-style | Style for indicator of carousel | String | is-boxes , is-dots , is-lines | is-dots |
overlay | Switch like a gallery | Boolean | — | false |
progress | Display the progress item of carousel | Boolean | — | false |
progress-type | Type (color) of the progress, optional | String | is-white , is-black , is-light ,
is-dark , is-primary , is-info , is-success ,
is-warning , is-danger ,
and any other colors you've set in the $colors list on Sass | is-primary |
with-carousel-list | Use when indicator custom with b-carousel-list | Boolean | — | false |
Item
Name | Description | Parameters |
---|---|---|
click | Non-native click event, will trigger only on an element that should normally not be clickable/focusable |
List
Name | Description | Type | Values | Default |
---|---|---|---|---|
v-model | Binding value | Number | — | 0 |
data | Carousel-list data (any b-image prop can be used) | Array | — | — |
has-drag | Toggle touch dragging, when touch not detected. Auto switch mouse dragging | Boolean | — | true |
has-grayscale | Give a grayscale effect to img | Boolean | — | false |
has-opacity | Give an opacity effect to img | Boolean | — | false |
repeat | Returns carousel to start when active item matches length of data | Boolean | — | false |
items-to-show | Count of items to be showed per view (supports a decimal). | Number | — | 4 |
items-to-list | Count of items to list when using navigation buttons | Number | 1-5 | 1 |
as-indicator | Switch mode to indicator for carousel | Boolean | — | false |
refresh | Refresh for carousel overlay | Boolean | — | false |
arrow | Display the "next" or "prev" action when first or last item | Boolean | — | true |
arrow-hover | Display arrow action when hovered. Hidden on mobile | Boolean | — | true |
icon-pack | Icon pack to use | String | mdi , fa , fas , far , fab , fad , fal | mdi |
icon-size | Arrow icon size, optional | String | is-small , is-medium , is-large | — |
icon-prev | Icon to use for previous arrow | String | — | chevron-left |
icon-next | Icon to use for next arrow | String | — | chevron-right |
# Variables
You can use these variables to customize this component.
Name | Description | Default |
---|---|---|
$carousel-min-height | The carousel default height before image load | 120px |
$carousel-arrow-background | The carousel arrow background | $scheme-main |
$carousel-arrow-color | The carousel color border | $primary |
$carousel-arrow-icon-spaced | The carousel arrow icon spaced left and right | 1.5rem |
$carousel-arrow-top | The carousel position by top | 50% |
$carousel-indicator-background | The carousel indicator background | rgba($scheme-invert, 0.45) |
$carousel-indicator-border | The carousel indicator color border | $scheme-main |
$carousel-indicator-color | The carousel indicator color | $primary |
$carousel-indicator-spaced | The carousel indicator spaced | .5rem |
$carousel-overlay-background | The carousel background when overlay | rgba($scheme-invert, 0.86) |
$carousel-overlay-z | The carousel z-index for overlay | 40 |
This page is open source. Noticed a typo or something's unclear?