Vivid API

Icon

Displays icons from the Vivid Icons Library using predefined colors and sizes.

Usage

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

Label

Use the label attribute to provide the Icon with a descriptive label so that it’s meaning can be conveyed to screen reader users.

See the Accessibility section for more information.

The label attribute was added as an alternative to using the aria-label attribute. It is preferable because using aria-label on non-interactive elements (like Icon) idoes not work consistantly across screen readers.

Custom Size

If the component is used without a size, it will use the current font-size value.

Custom Color

If the component is used without a connotation, it will use the current text color.

API Reference

Properties

PropertyTypeDefaultDescription
connotation'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement'The connotation the icon should have.
labelstringProvides a (screen reader only) descriptive label for the icon.
nameIconIdIndicates which icon to resolve. See the Vivid Icon Gallery for available icons: https://icons.vivid.vonage.com/ See the Vivid Icon Gallery for available icons: https://icons.vivid.vonage.com/
size0 | 1 | -1 | 2 | 3 | 4 | 5 | -6 | -5 | -4 | -3 | -2
PropertyTypeDefaultDescription
connotation'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement'The connotation the icon should have.
labelstringProvides a (screen reader only) descriptive label for the icon.
nameIconIdIndicates which icon to resolve. See the Vivid Icon Gallery for available icons: https://icons.vivid.vonage.com/ See the Vivid Icon Gallery for available icons: https://icons.vivid.vonage.com/
size0 | 1 | -1 | 2 | 3 | 4 | 5 | -6 | -5 | -4 | -3 | -2

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.