Vivid API

Selectable Box

Represents a content box to used in a group where one or more can be selected.

Usage

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

CSS Variables

Spacing

Use the --selectable-box-spacing variable to set the amount of spacing applied to the Selectable Box.

Checked Background Color

Use the --selectable-box-checked-bg variable to override the default background color applied to the checked state of the Selectable Box.

API Reference

Properties

PropertyTypeDefaultDescription
checkedbooleanControls the checked state
clickableBoxbooleanSets the whole box to be clickable
connotation'accent' | 'cta'Controls the color of the box and its control
controlPlacement'end' | 'start' | 'start-stacked' | 'end-stacked'Controls where the control should be placed in the box
controlType'checkbox' | 'radio'Controls the type of control in the box
disabledbooleanControls the disabled state of the box and its control
tightbooleanRemoves the padding from the boxes content area
PropertyTypeDefaultDescription
checkedbooleanControls the checked state
clickable-boxbooleanSets the whole box to be clickable
connotation'accent' | 'cta'Controls the color of the box and its control
control-placement'end' | 'start' | 'start-stacked' | 'end-stacked'Controls where the control should be placed in the box
control-type'checkbox' | 'radio'Controls the type of control in the box
disabledbooleanControls the disabled state of the box and its control
tightbooleanRemoves the padding from the boxes content area

Slots

NameDescription
defaultSlot for box's content.
NameDescription
defaultSlot for box's content.

Events

NameTypeDescription
changeCustomEvent<undefined>Fired when the checked state changes
NameTypeDescription
changeCustomEvent<undefined>Fired when the checked state changes