DOCS
v0.4

Components / Combobox

Combobox

Autocomplete combobox with search, multi-select, loading state, and keyboard navigation. Shares input-field styling with cg-input (size, rounded, error, success states).

formsv0.8.0

Playground

Examples

Basic
<cg-combobox placeholder="Select a framework"></cg-combobox>
Multi-select with chips
<cg-combobox multiple clearable placeholder="Pick frameworks"></cg-combobox>
Error state
<cg-combobox error placeholder="Required"></cg-combobox>
Large size
<cg-combobox size="lg" placeholder="Larger field"></cg-combobox>

Import

import { CgCombobox } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/cg-combobox';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
optionsComboOption[]Option list
valuestring | string[]Selected value(s)
multiplebooleanfalseMulti-select mode
placeholderstringPlaceholder text
searchablebooleantrueEnable search filter
clearablebooleanfalseShow clear button
disabledbooleanfalseDisabled state
loadingbooleanfalseLoading state
errorbooleanfalseError state — red border + error focus glow
successbooleanfalseSuccess state — success border + success focus glow
size"md" | "lg""md"Field height — matches cg-input sizes
rounded"none" | "sm" | "md" | "lg""lg"Border radius — matches cg-input rounded variants

Events

EventDetailDescription
cg-combobox-change{value}Selection changed