Data Grid

Reorder Rows

A grid that reorders rows: the grip drags with the mouse while the arrows, Home and End move a row from the keyboard and announce its new position.

What you can change

  • the line under the toolbar through caption
  • the wording of the announcement through liveTemplate with its {step}, {position} and {total} placeholders
  • the panel heading through heading and the step counter through stepsTemplate with {count}

A link for your AI agent: preview, code and instructions.

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.
AI
1Pick it here

put this on the home page as the hero:

https://vibeui.ru/c/datagrid-015?lang=en&theme=dark

2Paste into the chat
3Get it in your project

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-015-*. A client component: useState holds the row order, the id of the row being dragged and the row under the cursor. The grip is a button with draggable: the up and down arrows move the row by one step, and Home and End send it to the beginning and to the end, so the order changes without a mouse. Every move is written into a region with role=status and aria-live: for a screen reader the row would otherwise simply disappear from its former place. The row under the cursor is marked both by a fill and by a stripe on top through an inset box-shadow — a fill alone matches the hover state. The position number is recomputed from the index rather than stored in the data. 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.

Tags

  • datagrid
  • drag-and-drop
  • reorder
  • table
Component source

The same file your agent installs. Here in case you would rather copy it by hand.

Loading…