Vivid API

Table

A set of composable components that work together in the same way as native HTML table elements.

Usage

import { VTable, VTableHead, VTableBody, VTableRow, VTableHeaderCell, VTableCell } from '@vonage/vivid-api-vue';
import { registerTable } from '@vonage/vivid-api';
registerTable('your-prefix');

Table Head, Table Body, Table Row, Table Header Cell, and Table Cell sub-components are registered automatically in the same function.


API Reference

table

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.

table-cell

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.

Events

NameTypeDescription
cell-focusedCustomEvent<HTMLElement>Fires when the cell or its contents receive focus
NameTypeDescription
cell-focusedCustomEvent<HTMLElement>Fires when the cell or its contents receive focus

table-header-cell

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.

Events

NameTypeDescription
cell-focusedCustomEvent<HTMLElement>Fires when the cell or its contents receive focus
NameTypeDescription
cell-focusedCustomEvent<HTMLElement>Fires when the cell or its contents receive focus

table-row

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.

table-head

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.

table-body

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.

table-sorting-button

Properties

PropertyTypeDefaultDescription
direction'none' | 'desc' | 'asc'Current direction of the sorting
PropertyTypeDefaultDescription
direction'none' | 'desc' | 'asc'Current direction of the sorting

Slots

NameDescription
defaultDefault slot.
NameDescription
defaultDefault slot.

Events

NameTypeDescription
sortCustomEvent<undefined>Emitted when sorting button is clicked.
NameTypeDescription
sortCustomEvent<undefined>Emitted when sorting button is clicked.

Methods

NameParamsReturnsDescription
toggleSortvoid