Table Cell
<wa-table-cell>
Displays a data or column-header cell inside a table row.
wa-table-cell displays content in a wa-table-row. Use logical start, center, and end alignment values. In a header row, sort-key adds an accessible sort control.
API
Importing
If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.
Import this component directly from the CDN:
import 'https://cdn.yoummday.com/packages/@yoummday/webawesome/0.5.1/dist/components/table-cell/table-cell.js';
After installing Web Awesome via npm, import this component:
import '@yoummday/webawesome/dist/components/table-cell/table-cell.js';
If you're self-hosting Web Awesome, import this component from your server:
import './webawesome/dist/components/table-cell/table-cell.js';
To import this component for React 18 or below, use the following code:
import WaTableCell from '@yoummday/webawesome/dist/react/table-cell/index.js';
Slots
Learn more about using slots.
| Name | Description |
|---|---|
| (default) | The cell's content. |
Attributes & Properties
Learn more about attributes and properties.
| Name | Description | Reflects |
|---|---|---|
alignalign |
Aligns the cell's content using logical directions.
Type
TableCellAlign
Default
'start'
|
|
sortDirectionsort-direction |
The column's current sort direction.
Type
TableSortDirection
Default
'none'
|
|
sortKeysort-key |
Identifies the data key used when this header requests sorting.
Type
string
Default
''
|
Events
Learn more about events.
| Name | Description |
|---|---|
wa-sort-change |
Emitted when a sortable column header is activated. |
CSS Custom Properties
Learn more about CSS custom properties.
| Name | Description |
|---|---|
--width |
The cell's width.
Default
auto
|
CSS Parts
Learn more about CSS parts.
| Name | Description | CSS selector |
|---|---|---|
sort-button |
The sortable column's button. |
::part(sort-button)
|
sort-icon |
The current sort-direction icon. |
::part(sort-icon)
|
table-cell |
The cell's inner wrapper. |
::part(table-cell)
|
base |
An alias for the cell's inner wrapper. |
::part(base)
|
Dependencies
This component automatically imports the following elements. Sub-dependencies, if any exist, will also be included in this list.