Data Grid
Saved Views
A grid with saved views: a tab restores the filter and the sort at once, and any drift from the saved set is marked «changed».
What you can change
- the line under the toolbar through caption
- the initial view through startView and the set of views itself through views
- the stage list through stages and the sort names through sortText
A link for your AI agent: preview, code and instructions.
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.ru/c/datagrid-020?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
Technical notes
The component is self-contained: one file, no dependencies, the palette in --vibeui-datagrid-020-*. A client component: useState holds the list of views, the active name and the current state separately from it. Comparing the current state with the saved one gives the "changed" marker — without it there is no telling whether you are looking at a view or already at something of your own; the save button is blocked while there are no changes. The tabs lie in a nav with aria-label, and the active one is marked aria-current rather than by colour alone. A view stores both the filter and the sort: half a restored state is worse than none. The theme comes from the surrounding color-scheme through light-dark(): by default the grid lays no panel under itself, it sits directly on the page background and darkens along with it. The views and startView props keep acting after mounting: the reader's edits are stored alongside them rather than instead of them.
Tags
- datagrid
- views
- presets
- table
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…