Vivid API

Split Button

A split button is a dual-function menu button that offers a default action as well as the possibility of choosing a different action by selecting from a set of alternatives.

Usage

import { registerSplitButton } from '@vonage/vivid-api';
registerSplitButton('your-prefix');

Slots

Default Slot

Use the default slot to add content to be openned when clicking the secondary action.

Icon Slot

Use the icon slot add custom icons. If set, the icon attribute is ignored.

API Reference

Properties

PropertyTypeDefaultDescription
appearance'ghost' | 'filled' | 'outlined' | 'outlined-light'Sets the appearance
connotation'alert' | 'accent' | 'cta' | 'success' | 'announcement'Sets the connotation
disabledbooleanSets the disabled state
indicatorAriaLabelstringAccessible label for the secondary action
labelstringIndicates the split button's label.
shape'rounded' | 'pill'Sets the shape
size'condensed' | 'normal' | 'expanded' | 'super-condensed'Sets the size
splitIndicatorstringIcon for the secondary action
PropertyTypeDefaultDescription
appearance'ghost' | 'filled' | 'outlined' | 'outlined-light'Sets the appearance
connotation'alert' | 'accent' | 'cta' | 'success' | 'announcement'Sets the connotation
disabledbooleanSets the disabled state
indicator-aria-labelstringAccessible label for the secondary action
labelstringIndicates the split button's label.
shape'rounded' | 'pill'Sets the shape
size'condensed' | 'normal' | 'expanded' | 'super-condensed'Sets the size
split-indicatorstringIcon for the secondary action

Slots

NameDescription
defaultDefault slot.
iconThe preferred way to add an icon to the component.
NameDescription
defaultDefault slot.
iconThe preferred way to add an icon to the component.

Events

NameTypeDescription
action-clickCustomEvent<undefined>Event emitted when the action button is clicked
indicator-clickCustomEvent<undefined>Event emitted when the indicator button is clicked
NameTypeDescription
action-clickCustomEvent<undefined>Event emitted when the action button is clicked
indicator-clickCustomEvent<undefined>Event emitted when the indicator button is clicked