ui

Group

A component for visually grouping a series of controls. Built with Base UI and Tailwind CSS. Copy-paste ready.

Installation

Usage

Examples

With Input

Combines a Group with an Input for a compound field where the input and an action button share a single visual container.

Small Size

Renders a Group at sm size so all enclosed controls shrink proportionally for compact toolbar or inline contexts.

With Disabled Button

Shows how a disabled button integrates visually within the grouped control, preventing interaction without breaking the layout.

With Default Buttons

A baseline group of default-style buttons demonstrating the shared border collapse and corner rounding behavior.

With Prefix Label

Prepends a static text label to the group as the first item, anchoring a unit or field prefix such as "https://".

With Suffix Label

Appends a static text suffix or unit label at the trailing end of the group, such as ".com" or "kg".

Vertical

Stacks group items vertically instead of horizontally for menu-like or stacked control layouts.

Nested Groups

Demonstrates grouping within a group, allowing complex compound controls with multiple separators and sub-sections.

With Popup

Attaches a Popover or dropdown to a button inside the group, enabling inline contextual actions.

With Input Group

Nests an InputGroup inside a Group for more complex compound field arrangements with multiple inline adornments.

With Menu

Embeds a Menu trigger inside the group to create a split-button or action group with a dropdown for secondary options.

With Select

Attaches a Select dropdown to the group so users can choose between options alongside an adjacent action button.

Text Formatting Toolbar

Four icon-toggle buttons (bold, italic, underline, strikethrough) that track active state with aria-pressed — useful for rich-text editors.

Thumbs Up / Down Vote

Two reaction buttons with live counts using Badge. Clicking toggles the vote and updates the count in real time.

Media Player Controls

Previous, play/pause (stateful), and next icon buttons in a grouped row for compact audio or video playback interfaces.

Price Range Input

Dual numeric inputs with a currency prefix ($), a text separator (), and an apply button — all connected in a single Group.

Search with Category Filter

A Select for category, a text search input, and a search icon button composed into one compound search bar.