Button group

Column Chooser

A visible-columns chooser in a details panel with a counter in its header, where the last remaining column cannot be unchecked — a table without columns is a dead end.

React + Tailwind, shadcn-compatible: press “Copy for AI” and your Cursor or Claude Code agent installs it with the shadcn CLI.

What you can change

  • the full column list through columns
  • the initially hidden columns through hiddenColumns
  • the trigger caption through triggerLabel and the panel name through label

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

Preview

1440pxHost theme
Column Chooser — A visible-columns chooser in a details panel with a counter in its header, where the last remaining column cannot be unchecked — a table without columns is a dead end.

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.club/c/buttongroup-049?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…

How to use

<Buttongroup049
  columns={["Name", "Status", "Due"]}
  hiddenColumns={["Due"]}
  triggerLabel="Columns"
  onChange={(visible) => setColumns(visible)}
/>

A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.

Settings

Accent
accent · default: theme colour
Background
background · default: theme colour
Trigger caption
triggerLabel · default: Columns
Counter
countText · default: {visible} of {total}
Last column hint
lastColumnHint · default: At least one column has to stay
Panel name
label · default: Visible table columns

FAQ

How do I add Column Chooser with Cursor or Claude Code?
Press “Copy for AI” on this page and paste it into your agent's chat. The instruction contains the shadcn CLI install command, the dependencies and what to keep, so the agent installs this exact component instead of recreating a lookalike.
What does Column Chooser depend on?
No npm packages beyond React and Tailwind CSS.
What can I change in Column Chooser?
Adapt: the full column list through columns; the initially hidden columns through hiddenColumns; the trigger caption through triggerLabel and the panel name through label. Keep as installed: the local --vibeui-buttongroup-049-* palette — do not swap it for your theme tokens; details/summary instead of a hand-rolled menu: disclosure and keyboard come from the browser; the ban on unchecking the last column — a table without columns is a dead end, not a result.
Is Column Chooser free?
Yes. The preview is open without an account; with a free account you can copy up to 20 components a month.

For developers

npx shadcn@latest add https://vibeui.club/r/pro/buttongroup-049.json

This command needs a signed link: sign in and open “Component source” below — it issues a working link valid for 30 minutes. All install options

Technical notes

The component is self-contained: one file, no dependencies, its own palette in the --vibeui-buttongroup-049-* variables. It is a client component: useState holds the list of visible columns, and the "4 of 6" counter in the header is recomputed from that state. The disclosure is held by details/summary: the state, the keyboard and the "collapsed/expanded" announcement come from the browser, and a hand-rolled menu is not needed. The last remaining checkbox gets disabled and an explanation through title: a silent control reads as a breakage, and a table with no columns is a dead end there is no way out of with a mouse. The panel is positioned absolutely relative to the root and lies above the content through z-index:5. The checkboxes are real, and their colour is set with accent-color.

Tags

  • buttongroup
  • columns
  • details
  • checkbox
Component source

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

Loading…