Data Grid

Resizable Columns

A grid with resizable columns: the separator between headers is dragged with the mouse and nudged with the arrow keys.

What you can change

  • the line under the toolbar through caption
  • the lower column width bound through minWidth, in pixels
  • the file list through rows

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-009?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-009-*. A client component: the widths live in state and the drag draft in a ref, so that pointer movement does not drive extra renders. The separator is a button with role=separator, aria-orientation, aria-valuenow, aria-valuemin and aria-valuemax; the left and right arrows change the width in steps of 16 px, so a column can be set up without a mouse. The pointer is captured through setPointerCapture: without it the drag breaks the moment the cursor leaves the header. The widths are applied to the colgroup under table-layout:fixed, otherwise the browser recomputes them from the content. The cell content is truncated with an ellipsis, and the full value stays in title. The theme comes from the surrounding color-scheme through light-dark(): by default the grid lays no panel under itself, it sits on the page background, while the background prop switches on a panel of its own.

Tags

  • datagrid
  • resize
  • columns
  • table
Component source

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

Loading…