Table
Tables display data-centric information.
- Use tables to display data-centric information
- Tables can contain actions, such as buttons or links
- Two header sizes: "md" and "lg"
- Three data cell sizes: "sm", "md", and "lg"
- Two decoration styles: "zebra" and "default"
Example
Animal | Wild | Adopt |
---|---|---|
Dog | False | |
Cat | Maybe | |
Fish | True |
Sizes
Medium |
---|
Small |
Medium |
---|
Medium |
Large |
---|
Large |
Decoration
Default |
---|
one |
two |
three |
Zebra |
---|
one |
two |
three |
Resources
Name | Resource | Status |
---|---|---|
Figma | Design Kit (Figma) | Private |
On this page
Usage
A table provides a way to organize data in a grid format. Tables are used to display data-centric information and can contain actions, such as buttons or links.
Standard Table
Animal | Wild | Adopt |
---|---|---|
Dog | False | |
Cat | Maybe | |
Fish | True |
On this page
Usage
Animal | Wild | Adopt |
---|---|---|
Dog | False | |
Cat | Maybe | |
Fish | True |
Sizes
Medium |
---|
Small |
Medium |
---|
Medium |
Large |
---|
Large |
Decoration
Default |
---|
one |
two |
three |
Zebra |
---|
one |
two |
three |
Clickable
Name | |
---|---|
Jane Doe | 25 |
John Doe | 30 |
Customization
You can customize the table by utilizing the css
function. For full control, we recommend extending the recipes provided in your panda config.
Wu-Tang Members | Alias |
---|---|
Method Man | Johnny Blaze |
Raekwon | The Chef |
GZA | The Genius |
Ghostface Killah | Tony Starks |
Inspectah Deck | Rebel INS |
U-God | Golden Arms |
Masta Killa | Noodles |
Ol' Dirty Bastard | Ason Unique |
RZA | Bobby Digital |
API
All Table components extend the native HTML elements. The following APIs are the only exception.
Table
Name | Default | Description |
---|---|---|
caption | A description of the table used for accessibility. |
Th
Name | Default | Description |
---|---|---|
size | md | The cell size of the th. |
onClick | Converts the table cell to a button element. |
Tbody
Name | Default | Description |
---|---|---|
decoration | default | Which style decoration to display for rows. |
Td
Name | Default | Description |
---|---|---|
size | md | The cell size of the td. |
On this page
Use Cases
- Users should be able to:
- Understand meaning of the table
- Navigate to and activate actions in cells with assistive technology
- Inputs used within the table cells should include Labels (hidden or not)
Input fields in table cells
Input fields in table cells should include labels. The labels can be hidden, but they should be present in the DOM for screen readers to read. This is important for users who rely on screen readers to understand the context of the input field.
Keyboard Navigation
Keys | Actions |
---|---|
Tab | Navigate to actions within the table cells. |
On this page