> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Table > Display data in rows and columns using markdown tables with optional sticky headers. Tables display data in rows and columns using standard markdown syntax. For longer datasets, you can make headers sticky, add in-table search, and paginate rows so the table stays easy to scan. ## Usage Create tables using standard markdown syntax with pipes (`|`) and hyphens (`-`): | Plant | Light Requirements | Water | | ----------- | ---------------------- | --------- | | Fern | Partial shade | Weekly | | Snake Plant | Low to bright indirect | Bi-weekly | | Monstera | Bright indirect | Weekly | **`Markdown`** ```jsx Markdown | Plant | Light Requirements | Water | |-------|-------------------|-------| | Fern | Partial shade | Weekly | | Snake Plant | Low to bright indirect | Bi-weekly | | Monstera | Bright indirect | Weekly | ``` ## Variants ### Sticky headers The `` 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 | **`Markdown`** ```jsx Markdown maxLines=10 | 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 | ``` ### Searchable tables The `` component enables client-side filtering for large tables. A search input appears above the table that filters rows in real-time using case-insensitive substring matching. Use the `placeholder` prop to customize the search input placeholder text. | 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 | **`Markdown`** ```jsx Markdown maxLines=10 | 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 | ``` ### Sticky searchable tables The `` component combines both sticky headers and search functionality: | 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 | **`Markdown`** ```jsx Markdown maxLines=10 | 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 | ``` ### Paginated tables The `` component splits long tables into pages with a previous/next footer. Set `pageSize` to control how many rows appear per page. It defaults to 10. | 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 | **`Markdown`** ```jsx Markdown maxLines=10 | 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 | ``` ### Expandable tables Add the `expandable` prop to a `` to replace the previous/next footer with **Show all** and **Show fewer** controls that expand or collapse the full dataset in place. `expandable` requires pagination, so it applies alongside `pageSize`. | 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 | **`Markdown`** ```jsx Markdown maxLines=10 | 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 | ``` ### Paginated searchable tables The `` component combines search with pagination. Search filters the full dataset first, then pagination operates on the matching rows. Use the `placeholder` prop to customize the search input, and add `expandable` to swap the previous/next footer for Show all / Show fewer. | 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 | **`Markdown`** ```jsx Markdown maxLines=10 | 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 table attributes Any table with `className="fern-table"` accepts the same behaviors as attributes on the opening `` tag: `sticky` for a fixed header, `searchable` for a search input, and `paginate` with `pageSize` for pagination. Add `expandable` to swap the page footer for Show all / Show fewer controls. The attributes combine freely, and this is the only way to get a table that is both sticky and paginated (the wrapper components don't include that variant). **`Markdown`** ```jsx Markdown maxLines=10
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
...
Plant Light Requirements Water
Fern Partial shade Weekly
``` ## Custom styling Sticky tables can be styled independently from regular tables. To add custom styling, target the `.fern-table.sticky` selector: ```css .fern-table.sticky { //custom css here } ``` ## Properties ### `` properties **`children`** `markdown table` — required The markdown table to display with sticky headers. The table must be formatted using standard markdown table syntax. --- ### `` properties **`children`** `markdown table` — required The markdown table to display with search functionality. The table must be formatted using standard markdown table syntax. --- **`placeholder`** `string` Custom placeholder text for the search input. Defaults to `"Search..."`. --- ### `` properties **`children`** `markdown table` — required The markdown table to display with both sticky headers and search functionality. The table must be formatted using standard markdown table syntax. --- **`placeholder`** `string` Custom placeholder text for the search input. Defaults to `"Search..."`. --- ### `` properties **`children`** `markdown table` — required The markdown table to display with pagination. The table must be formatted using standard markdown table syntax. --- **`pageSize`** `number` — default: 10 The number of rows to display per page. --- **`expandable`** `boolean` Replaces the previous/next footer with Show all / Show fewer controls that expand or collapse the full dataset in place. --- ### `` properties **`children`** `markdown table` — required The markdown table to display with both search and pagination. The table must be formatted using standard markdown table syntax. --- **`pageSize`** `number` — default: 10 The number of rows to display per page. Pagination applies to the rows matching the current search. --- **`expandable`** `boolean` Replaces the previous/next footer with Show all / Show fewer controls that expand or collapse the matching rows in place. --- **`placeholder`** `string` Custom placeholder text for the search input. Defaults to `"Search..."`. --- ### HTML `` attributes **`sticky`** `boolean` When set on an HTML table element, makes the table header sticky during scrolling. --- **`searchable`** `boolean` When set on an HTML table element, adds a search input above the table that filters rows in real-time using case-insensitive substring matching. --- **`paginate`** `boolean` When set on an HTML table element, splits rows across pages with a previous/next footer. --- **`pageSize`** `number` — default: 10 The number of rows to display per page. Applies only when `paginate` is set. --- **`expandable`** `boolean` Replaces the previous/next footer with Show all / Show fewer controls. Requires `paginate`. --- **`placeholder`** `string` Custom placeholder text for the search input when `searchable` is enabled. Defaults to `"Search..."`. --- **`className`** `string` CSS class name(s) to apply to the table. Use `fern-table` for default Fern styling. --- > Display data in rows and columns using markdown tables with optional sticky headers.