Table
Tables display data in rows and columns using standard markdown syntax. For longer datasets, you can use sticky table headers that remain visible while scrolling.
Usage
Create tables using standard markdown syntax with pipes (|) and hyphens (-):
Variants
Sticky headers
The <StickyTable> component adds a fixed header that remains visible while scrolling. Use sticky tables for longer datasets where users need to reference column headers throughout the table.
| Plant | Light Requirements | Water |
|---|---|---|
| Fern | Partial shade | Weekly |
| Snake Plant | Low to bright indirect | Bi-weekly |
| Monstera | Bright indirect | Weekly |
| Pothos | Low to bright indirect | Weekly |
| Fiddle Leaf Fig | Bright indirect | Weekly |
| Peace Lily | Low to medium indirect | Weekly |
| Rubber Plant | Bright indirect | Weekly |
| ZZ Plant | Low to bright indirect | Bi-weekly |
| Philodendron | Medium to bright indirect | Weekly |
| Aloe Vera | Bright direct | Bi-weekly |
| Boston Fern | Partial shade | 2-3x weekly |
| Spider Plant | Medium to bright indirect | Weekly |
| Dracaena | Medium indirect | Weekly |
| Bird of Paradise | Bright indirect to direct | Weekly |
| Calathea | Medium indirect | Weekly |
HTML tables with sticky headers
Add the sticky attribute to the opening <table> tag. No further changes to your table syntax are needed.
| Plant | Light Requirements | Water |
|---|---|---|
| Fern | Partial shade | Weekly |
| Snake Plant | Low to bright indirect | Bi-weekly |
| Monstera | Bright indirect | Weekly |
| Pothos | Low to bright indirect | Weekly |
| Fiddle Leaf Fig | Bright indirect | Weekly |
| Peace Lily | Low to medium indirect | Weekly |
| Rubber Plant | Bright indirect | Weekly |
| ZZ Plant | Low to bright indirect | Bi-weekly |
| Philodendron | Medium to bright indirect | Weekly |
| Aloe Vera | Bright direct | Bi-weekly |
| Boston Fern | Partial shade | 2-3x weekly |
| Spider Plant | Medium to bright indirect | Weekly |
| Dracaena | Medium indirect | Weekly |
| Bird of Paradise | Bright indirect to direct | Weekly |
| Calathea | Medium indirect | Weekly |
Custom styling
Sticky tables can be styled independently from regular tables. To add custom styling, target the .fern-table.sticky selector:
Properties
<StickyTable> properties
The markdown table to display with sticky headers. The table must be formatted using standard markdown table syntax.
HTML <table> attributes
When set on an HTML table element, makes the table header sticky during scrolling.
CSS class name(s) to apply to the table. Use fern-table for default Fern styling.