ACTIONS / COMPONENT 05

Clickable chip

React component

Select and remove compact filters without losing context.

Try it out

Use the live controls or open the Code tab to view and copy the example.

API reference

Generated from the package’s TypeScript exports. Standard React event and ARIA attributes are also accepted where the component wraps a native element.

PropTypeDescription
selectedboolean | undefinedDefault: falseSee the typed definition and working example for this option.
onRemove(() => void) | undefinedSee the typed definition and working example for this option.
removeLabelstring | undefinedDefault: "Remove filter"See the typed definition and working example for this option.
disabledboolean | undefinedDisables interaction (or date matchers for DatePicker).
namestring | undefinedField name used in form submission.
type"submit" | "reset" | "button" | undefinedStandard React / HTML attribute passed to the underlying element.
valuestring | number | readonly string[] | undefinedControlled value. Pair with its change callback.
defaultCheckedboolean | undefinedStandard React / HTML attribute passed to the underlying element.
defaultValuestring | number | readonly string[] | undefinedInitial value for uncontrolled usage.
classNamestring | undefinedAdditional CSS class names.
idstring | undefinedStandard React / HTML attribute passed to the underlying element.
styleCSSProperties | undefinedInline styles, including CSS custom property overrides.
relstring | undefinedStandard React / HTML attribute passed to the underlying element.
childrenReactNodeContent rendered inside the component.
onFocusFocusEventHandler<HTMLButtonElement> | undefinedStandard React / HTML attribute passed to the underlying element.
onBlurFocusEventHandler<HTMLButtonElement> | undefinedStandard React / HTML attribute passed to the underlying element.
onChangeChangeEventHandler<HTMLButtonElement, Element> | undefinedStandard React / HTML attribute passed to the underlying element.
onErrorReactEventHandler<HTMLButtonElement> | undefinedStandard React / HTML attribute passed to the underlying element.
onClickMouseEventHandler<HTMLButtonElement> | undefinedStandard React / HTML attribute passed to the underlying element.

Accessibility & interaction

Maintain an understandable accessible name and preserve visible focus for all actions.

Visible focus, reduced motion, and both color themes are shared across staqui. Choose labels and document structure that make sense in your application; automated checks do not replace assistive-technology testing.

Variants & implementation notes

Selection uses aria-pressed; removal is a separate sibling button. The parent owns selection and removal state.

Use the typed API above for the supported variants. The example demonstrates the primary composition; shared controls inherit hover, focus, active and disabled treatment where applicable.

Compose with