Toggle Group

Task Filter Group

A single-select filter segment group with a count badge on every button: the number is always computed from the same task list the region below displays.

What you can change

  • the group name through label
  • the initial filter through defaultValue
  • the task list through tasks

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/togglegroup-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

One file, zero dependencies, the --vibeui-togglegroup-015-* palette. Client component: useState for the filter and useId for the id of the linked list. The count is not a separate magic number but a .filter().length over the shared task array: the figure on a segment and the contents of the list after a click always agree. The button's visible text and its aria-label diverge on purpose: on screen "Active" and a "12" badge, and for a screen reader one phrase, "Active, 12".

Tags

  • togglegroup
  • filter
  • badge
  • count
Component source

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

Loading…