Vivid Logo Vivid

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-vue';
import { registerTable } from '@vonage/vivid';

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

Name Description
default Default slot.
Name Description
default Default slot.

table-cell

Slots

Name Description
default Default slot.
Name Description
default Default slot.

Events

Event Type Description
cell-focused CustomEvent<HTMLElement> Fires when the cell or its contents receive focus
Name Type Description
cell-focused CustomEvent<HTMLElement> Fires when the cell or its contents receive focus

table-header-cell

Slots

Name Description
default Default slot.
Name Description
default Default slot.

Events

Event Type Description
cell-focused CustomEvent<HTMLElement> Fires when the cell or its contents receive focus
Name Type Description
cell-focused CustomEvent<HTMLElement> Fires when the cell or its contents receive focus

table-row

Slots

Name Description
default Default slot.
Name Description
default Default slot.

table-head

Slots

Name Description
default Default slot.
Name Description
default Default slot.

table-body

Slots

Name Description
default Default slot.
Name Description
default Default slot.

table-sorting-button

Properties

Property Type Default Description
direction 'none' | 'desc' | 'asc' Current direction of the sorting
Property Type Default Description
direction 'none' | 'desc' | 'asc' Current direction of the sorting

Slots

Name Description
default Default slot.
Name Description
default Default slot.

Events

Event Type Description
sort CustomEvent<undefined> Emitted when sorting button is clicked.
Name Type Description
sort CustomEvent<undefined> Emitted when sorting button is clicked.

Methods

Name Params Returns Description
toggleSort void