Checkbox Button Group

A multi-selection button group with card-style checkboxes, icons, and custom indicators.

Usage

Select featuresChoose all that apply to your project
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

Anatomy

Import the CheckboxButtonGroup component and access all parts using dot notation.

import { CheckboxButtonGroup } from "@thenamespace/uikit";

<CheckboxButtonGroup>
  <CheckboxButtonGroup.Item>
    <CheckboxButtonGroup.ItemIcon />
    <CheckboxButtonGroup.ItemContent />
    <CheckboxButtonGroup.Indicator />
  </CheckboxButtonGroup.Item>
</CheckboxButtonGroup>;

Controlled

Add-onsSelect the add-ons you need

Selected: backups

"use client";

import { useState } from "react";

import { CheckboxButtonGroup } from "@thenamespace/uikit";

Custom Indicator

Notification preferences
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

Disabled Group

Select featuresFeature selection is temporarily unavailable.
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

Grid Layout

Add-ons
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

Icon Cards

Security features
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Chip } from "@thenamespace/uikit/chip";
import { Description } from "@thenamespace/uikit/description";

No Indicator

Select features
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

Render Prop Children

Select features
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

Subscription Plans

Choose a subscription

Pick a plan. Try a month on us!

*APY is variable and subject to change at our discretion, without prior notice.

Compare plans
"use client";

import type { CSSProperties } from "react";

import { CheckboxButtonGroup } from "@thenamespace/uikit";

With Icons

Role permissions
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

With Ripple

Integrations
"use client";

import { CheckboxButtonGroup } from "@thenamespace/uikit";
import { Description } from "@thenamespace/uikit/description";
import { Label } from "@thenamespace/uikit/label";

CSS Classes

Base Classes

  • .checkbox-button-group - Base CheckboxGroup container with flex layout

Layout Classes

  • .checkbox-button-group--grid - Grid layout mode

Element Classes

  • .checkbox-button-group__item - Card-like checkbox button with border and selection ring
  • .checkbox-button-group__indicator - Positioned top-right indicator (checkbox control or custom icon)
  • .checkbox-button-group__item-content - Text/content area wrapping Checkbox.Content
  • .checkbox-button-group__item-icon - Leading icon container

Interactive States

  • Selected: [data-selected="true"] on .checkbox-button-group__item (accent ring)
  • Focus visible: :focus-visible or [data-focus-visible="true"] on .checkbox-button-group__item (focus ring)
  • Disabled: :disabled or [aria-disabled="true"] on .checkbox-button-group__item (reduced opacity)

CSS Variables

  • --checkbox-button-group-item-radius - Border radius of items (default: var(--radius-2xl))

API Reference

CheckboxButtonGroup

The root component. Wraps Namespace UIKit CheckboxGroup with card-style layout.

PropTypeDefaultDescription
layout'flex' | 'grid''flex'Layout mode for items

Also supports all Namespace UIKit CheckboxGroup props.

CheckboxButtonGroup.Item

A selectable card wrapping Namespace UIKit Checkbox. Supports render prop children for accessing selection state.

Also supports all Namespace UIKit Checkbox props.

CheckboxButtonGroup.Indicator

Selection indicator positioned at the top-right of the item.

  • No children: renders the default Namespace UIKit checkbox (Control + Indicator)
  • With children: renders a custom icon that appears only when selected
PropTypeDefaultDescription
childrenReactNode-Custom indicator icon (shown when selected)

Also supports all native span HTML attributes.

CheckboxButtonGroup.ItemContent

Content area for title and description text. Wraps Namespace UIKit Checkbox.Content.

PropTypeDefaultDescription
childrenReactNode-Content elements

Also supports all native div HTML attributes.

CheckboxButtonGroup.ItemIcon

Leading icon container.

PropTypeDefaultDescription
childrenReactNode-Icon element

Also supports all native div HTML attributes.