combobox-usage

Render accessible searchable Combobox selections in React forms with Zag.js.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill combobox-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: combobox-usage
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/ui/skills/combobox-usage
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill combobox-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many apps need a reliable, accessible dropdown with search capabilities and stable UX; combobox-usage provides a ready-to-use solution from @techsio/ui-kit to implement searchable, controlled selections with Zag.js collection behavior, multiple mode, and token styling.

Core Features & Use Cases

  • Searchable input with keyboard navigation and Zag.js collection behavior.
  • Supports single and multiple selection, validation status, and clearable input.
  • Enables token styling and integration with existing form flows.

Quick Start

Import the Combobox component and render it with an items list and an onChange handler to enable a searchable, multi-mode selection in your form.

Frequently Asked Questions about combobox-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a searchable dropdown to a React form?

To add a searchable dropdown in React, import the Combobox component from @techsio/ui-kit and provide an items list with an onChange handler. It leverages Zag.js collection behavior to render an accessible, controlled selection input.

Can I use a combobox for multiple selection with token styling in React?

Yes, the combobox supports multiple selection mode with token styling. You can enable this by configuring the component to allow multiple selections, rendering selected items as tokens within your web forms.

Does the Techsio combobox component support validation states?

Yes, the combobox supports validation states through the validateStatus property. This allows you to integrate the searchable input directly into existing form validation flows and display error or success UI feedback.

How does Zag.js handle keyboard navigation in a searchable selection input?

Zag.js provides the underlying collection behavior for the searchable selection input, ensuring stable UX with full keyboard navigation. This allows users to navigate, select, and clear items without relying solely on mouse interactions.

What is the best way to manage controlled values in a React combobox?

The best way to manage controlled values is using the component's controlled value and inputValue properties. This ensures the searchable input's state stays synchronized with your React application's form data during user interactions.

How do I make a searchable dropdown clearable in a web form?

You can make a searchable dropdown clearable by enabling the clearable property on the Combobox component. This allows users to quickly remove their selected single or multiple selections from the input field.