npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xsolla/xui-checkbox-tag-group

v0.135.0

Published

A cross-platform React component for selecting multiple options displayed as tag-style checkboxes. Supports controlled and uncontrolled modes with validation. Works on both React (web) and React Native.

Downloads

5,275

Readme

Checkbox Tag Group

A cross-platform React component for selecting multiple options displayed as tag-style checkboxes. Supports controlled and uncontrolled modes with validation. Works on both React (web) and React Native.

Installation

npm install @xsolla/xui-checkbox-tag-group
# or
yarn add @xsolla/xui-checkbox-tag-group

Demo

Basic Usage

import * as React from 'react';
import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';

const options = [
  { label: 'Action', value: 'action' },
  { label: 'RPG', value: 'rpg' },
  { label: 'Strategy', value: 'strategy' },
];

export default function BasicCheckboxTagGroup() {
  return (
    <CheckboxTagGroup
      options={options}
      defaultValue={['action']}
      aria-label="Game genres"
    />
  );
}

Controlled

import * as React from 'react';
import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';

const options = [
  { label: 'Action', value: 'action' },
  { label: 'RPG', value: 'rpg' },
  { label: 'Strategy', value: 'strategy' },
];

export default function ControlledCheckboxTagGroup() {
  const [values, setValues] = React.useState(['action']);

  return (
    <CheckboxTagGroup
      options={options}
      value={values}
      onChange={setValues}
      aria-label="Game genres"
    />
  );
}

Sizes

import * as React from 'react';
import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';

const options = [
  { label: 'Item 1', value: 'item1' },
  { label: 'Item 2', value: 'item2' },
  { label: 'Item 3', value: 'item3' },
];

export default function CheckboxTagGroupSizes() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>
      <CheckboxTagGroup options={options} size="xl" defaultValue={['item1']} aria-label="XL tags" />
      <CheckboxTagGroup options={options} size="lg" defaultValue={['item1']} aria-label="LG tags" />
      <CheckboxTagGroup options={options} size="md" defaultValue={['item1']} aria-label="MD tags" />
      <CheckboxTagGroup options={options} size="sm" defaultValue={['item1']} aria-label="SM tags" />
    </div>
  );
}

Anatomy

Import the component and use it directly:

import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';

<CheckboxTagGroup
  options={options}               // Array of { label, value, disabled? }
  value={selectedValues}          // Controlled selected values
  defaultValue={['item1']}       // Default values (uncontrolled)
  onChange={handleChange}         // Callback with new values array
  size="md"                       // Size variant
  disabled={false}                // Disable all options
  errorMessage="Select at least one" // Error message
  aria-label="Filter options"    // Accessible label
/>

Examples

With Error

import * as React from 'react';
import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';

const options = [
  { label: 'Action', value: 'action' },
  { label: 'RPG', value: 'rpg' },
  { label: 'Strategy', value: 'strategy' },
];

export default function ErrorCheckboxTagGroup() {
  return (
    <CheckboxTagGroup
      options={options}
      errorMessage="Please select at least one genre"
      aria-label="Game genres"
    />
  );
}

With Disabled Option

import * as React from 'react';
import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';

const options = [
  { label: 'Action', value: 'action' },
  { label: 'RPG (coming soon)', value: 'rpg', disabled: true },
  { label: 'Strategy', value: 'strategy' },
];

export default function DisabledOptionCheckboxTagGroup() {
  return (
    <CheckboxTagGroup
      options={options}
      defaultValue={['action']}
      aria-label="Game genres"
    />
  );
}

Fully Disabled

import * as React from 'react';
import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';

const options = [
  { label: 'Action', value: 'action' },
  { label: 'RPG', value: 'rpg' },
  { label: 'Strategy', value: 'strategy' },
];

export default function DisabledCheckboxTagGroup() {
  return (
    <CheckboxTagGroup
      options={options}
      defaultValue={['action']}
      disabled
      aria-label="Game genres"
    />
  );
}

API Reference

CheckboxTagGroup

Props:

| Prop | Type | Default | Description | | :--- | :--- | :------ | :---------- | | options | CheckboxTagGroupItem[] | - | Array of options to display. | | value | string[] | - | Controlled selected values. | | defaultValue | string[] | [] | Default selected values (uncontrolled). | | onChange | (values: string[]) => void | - | Callback when selection changes. | | size | "xl" \| "lg" \| "md" \| "sm" | "md" | Size of the tag items. | | disabled | boolean | false | Disable all options. | | errorMessage | string | - | Error message displayed below the group. | | aria-label | string | - | Accessible label for the group. |

CheckboxTagGroupItem

| Prop | Type | Default | Description | | :--- | :--- | :------ | :---------- | | label | string | - | Display text for the option. | | value | string | - | Value identifier for the option. | | disabled | boolean | false | Disable this specific option. |

Accessibility

  • Uses role="group" with aria-label on the container
  • Each option has role="checkbox" with aria-checked
  • aria-disabled set on disabled options
  • aria-describedby links to error message when present
  • Error messages use role="alert" for screen reader announcement
  • Keyboard navigation with Tab between options and Space/Enter to toggle