DataGrid

stable llms.txt

Grid component for structured data with sortable columns, row selection, custom cell rendering, and responsive columns.

Installation

bash
ts

Preset Configuration

Customize the appearance using presets

Examples

Explore different variations and use cases

Basic DataGrid

Simple data grid with header and rows

Selectable Rows

DataGrid with row selection via checkboxes

Sortable Columns

DataGrid with click-to-sort column headers

Row-Spanning Side Column

Create a vertical side rail that spans all body rows while preserving subgrid alignment

API Reference

Accessibility

  • CSS subgrid layout keeps columns pixel-perfectly aligned across header and body rows
  • Row selection state tracked via bond — no DOM scanning required
  • hidden prop on Th automatically hides corresponding Td cells by DOM index
  • Sort direction exposed as bindable prop for controlled external state management
  • header prop on Tr prevents row from being registered in the selection map

© 2026 Svelte Atoms. Open source under the MIT license.

Built with Svelte 5 · Runes · TailwindCSS