Tables
import { TgTableDirective } from '@trademe/tangram';
Tables can be used to clearly display data.
Example
| Header | Header one | Header two |
|---|---|---|
| Content header | Column one | Column two |
| Footer header | Footer one | Footer two |
Behaviour
Long strings of text such as email addresses will break onto two lines when they exceed the width of the table cell.
Accessibility
- Add a caption to provide a description of the table content.
- Apply the scope attribute to row and column headers to aid customers navigating content using a screen reader.
- When
is applied, change thecompact values accordingly to allow for the stacked layout atscope breakpoint.sm