Vivid API

Flag

Displays a country flag based on an ISO country code.

Usage

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

Label

Use the label attribute to provide an accessible name when the flag conveys meaning. When no label is provided (or it is whitespace-only), aria-hidden="true" is applied automatically and the flag is treated as decorative.

See the Accessibility section for more information.

Size

Use the size attribute to choose a predefined size scale (shared with vwc-icon).

API Reference

Properties

PropertyTypeDefaultDescription
codestringISO 3166-1 alpha-2 country code (e.g. "GB", "UK", "US"). When set, the component shows the matching flag (from the Vivid/Vonage icon set).
labelstringProvides a (screen reader only) descriptive label for the flag.
size0 | 1 | -1 | 2 | 3 | 4 | 5 | -6 | -5 | -4 | -3 | -2Controls the rendered size. Uses the same scale and behavior as `Icon.size`.
PropertyTypeDefaultDescription
codestringISO 3166-1 alpha-2 country code (e.g. "GB", "UK", "US"). When set, the component shows the matching flag (from the Vivid/Vonage icon set).
labelstringProvides a (screen reader only) descriptive label for the flag.
size0 | 1 | -1 | 2 | 3 | 4 | 5 | -6 | -5 | -4 | -3 | -2Controls the rendered size. Uses the same scale and behavior as `Icon.size`.