A shadcn-style combobox component built with Ark UI primitives.

Installation

npx shadcn@latest add @ark-cn/combobox

Usage

import * as Combobox from "@/components/ui/combobox"

Read exported parts in src/components/ui/combobox.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Basic

Clear

Grouped

Multiple Selection

AppleStrawberry

Sizes

With Label

Auto Highlight

Disabled

Select Button

API reference

This component mirrors the upstream Ark UI primitive. All props and DOM behavior are defined by Ark unless you see an ark-cn-only row below.

Combobox

PropTypeDescription
children?ReactNode | ((api: UseComboboxContext<T>) => ReactNode)Render-prop or static children.
items?T[]List of items when not passing a custom collection.
collection?ListCollection<T>Pre-built collection (alternative to items).

ComboboxInput

PropTypeDescription
size?"default" | "sm" | "lg"Input group size.
startAddon?ReactNodeSlot before the input field.
endAddon?ReactNodeSlot after the input field.
showClear?booleanToggles the clear control.
showIndicator?booleanToggles the open/chevron indicator.

ComboboxPopup

PropTypeDescription
disablePortal?booleanRenders content in-place instead of portaled.

See the ARK UI documentation for the full API.