BlogPlaygroundOne

VCarousel API


Props
name
type
default
string
undefined

Applies a color to the navigation dots - supports utility colors (for example success or purple) or css color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

boolean
true

Determines whether carousel is continuous.

boolean
false

Enables crossfade transition.

boolean
false

Determines if the carousel should cycle through images.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
'$delimiter'

Sets icon for carousel delimiter.

'vertical' | 'horizontal'
'horizontal'

The transition direction when changing windows.

boolean
false

Removes the ability to click or target the component.

string | number
500

Sets the height for the component.

boolean
false

Hides the bottom delimiter background.

boolean
false

Hides the carousel’s bottom delimiters.

string | number
6000

The duration between image cycles. Requires the cycle prop.

boolean | 'force'
'force'

Forces at least one item to always be selected (if available).

unknown
undefined

The v-model value of the component. If component supports the multiple prop, this defaults to an empty array.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
'$next'

The displayed icon for forcing pagination to the next item.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
'$prev'

The displayed icon for forcing pagination to the previous item.

string | boolean
false

Displays a carousel progress bar. Requires the cycle prop and interval.

boolean
false

Reverse the normal transition direction.

string
'v-window-item--active'

Configure the active CSS class applied when an item is selected.

string | boolean
true

Displays arrows for next/previous navigation.

string | (new () => any) | FunctionalComponent
'div'

Specify a custom tag used on the root element.

string
undefined

Specify a theme for this component and all of its children.

boolean | TouchHandlers
undefined

Provide a custom left and right function when swiped left or right.

number
undefined

Overrides transition duration. Does not work in firefox, safari <18, or with prefers-reduced-motion: reduce.

boolean | 'left' | 'right'
false

Displays the navigation arrows vertically instead of horizontally.

boolean | 'left' | 'right'
false

Displays carousel delimiters vertically.

Events
name
type
[unknown]

Event that is emitted when the component’s model changes.

Slots
{ group: { register: ( item: { id: string value: Ref<unknown, unknown> disabled: Ref<boolean | undefined, boolean | undefined> useIndexAsValue: boolean }, cmp: ComponentInternalInstance, ) => void unregister: (id: string) => void select: (id: string, value: boolean) => void selected: Ref<readonly string[], readonly string[]> isSelected: (id: string) => boolean prev: () => void next: () => void selectedClass: Ref<string | undefined, string | undefined> items: Readonly< Ref< { id: string; value: unknown; disabled: boolean | undefined }[], { id: string; value: unknown; disabled: boolean | undefined }[] > > disabled: Ref<boolean | undefined, boolean | undefined> getItemIndex: (value: unknown) => number } }
{ props: Record<string, any> item: { id: string; value: unknown; disabled: boolean } }
{ props: { icon: | string | (string | [string, number])[] | (new () => any) | FunctionalComponent class: string onClick: () => void 'aria-label': string } }
{ props: { icon: | string | (string | [string, number])[] | (new () => any) | FunctionalComponent class: string onClick: () => void 'aria-label': string } }

The default Vue slot.

Define a custom item appearance.

Slot displaying the arrow switching to the next item.

Slot displaying the arrow switching to the previous item.

SASS Variables
name
default
tools.theme-color('surface-variant', .3)
rgb(var(--v-theme-on-surface-variant))
50px
(
  $carousel-controls-bg,
  $carousel-controls-color
)
1
.8
.5
0 8px