mantine-combobox
БесплатноБез исполняемых скриптовНе проверенBuild custom dropdown/select/autocomplete/multiselect components using Mantine's Combobox primitives. Use this skill when: (1) creating a new custom…
от mantinedev★ 68 звёзд на GitHubОб этом скилле
Mantine Combobox Skill
Written for Mantine 9.x.
Overview
Combobox provides low-level primitives for building any select-like UI. The built-in
Select, MultiSelect, Autocomplete, and TagsInput components are all built on top of it.
Check for a ready-made component first
Build with Combobox primitives only when none of these fit:
| Need | Use |
|---|---|
| Standard select, multi-select, autocomplete or tags input | Select, MultiSelect, Autocomplete, TagsInput (all support renderOption) |
| Options dropdown attached to a button or any other element, no input | ComboboxPopover (data-driven: data, value, onChange, searchable, multiple) |
| Hierarchical options | TreeSelect (see below) |
| More than a few hundred options | Combobox with useVirtualizedCombobox, see the virtualized pattern |
<ComboboxPopover data={['React', 'Angular', 'Vue']} value={value} onChange={setValue}>
<ComboboxPopover.Target>
<Button variant="default">{value || 'Select framework'}</Button>
</ComboboxPopover.Target>
</ComboboxPopover>
ComboboxPopover opens on target click by itself, marks the selected option with a check icon and
handles keyboard navigation. Useful props: searchable, multiple (value becomes string[], the
dropdown stays open while picking), allowDeselect={false} (one option is always selected),
nothingFoundMessage, renderOption, limit, maxDropdownHeight, name (hidden input for forms),
comboboxProps={{ width: 220, position: 'bottom-start' }}. data supports disabled items and groups
like Select: [{ group: 'Size', items: [{ value: 'xs', label: 'XS' }] }]. It cannot render custom dropdown content (tabs, header, footer, create actions): use
Combobox primitives for that.
TreeSelect takes nested data ({ value, label, children? }[], unique values) and renders an
input with an expandable tree in the dropdown. Props include mode (single, multiple, or checkbox
with parent-child cascade), searchable, clearable, renderNode. Build the tree from Combobox
primitives instead when you need a different layout: only leaves selectable, a flat list of search
results with full paths, or a button trigger. In that case render every visible row as a
Combobox.Option and decide in onOptionSubmit whether the row selects or expands.
Core Workflow
1. Create the store
const combobox = useCombobox({
onDropdownClose: () => combobox.resetSelectedOption(),
onDropdownOpen: () => combobox.selectFirstOption(),
});
2. Render structure
<Combobox store={combobox} onOptionSubmit={handleSubmit}>
<Combobox.Target targetType="button">
<InputBase
component="button"
type="button"
pointer
rightSection={<Combobox.Chevron />}
onClick={() => combobox.toggleDropdown()}
>
{value || <Input.Placeholder>Pick value</Input.Placeholder>}
</InputBase>
</Combobox.Target>
<Combobox.Dropdown>
<Combobox.Options>
{options.map((item) => (
<Combobox.Option value={item} key={item}>{item}</Combobox.Option>
))}
</Combobox.Options>
</Combobox.Dropdown>
</Combobox>
3. Handle submit
const handleSubmit = (val: string) => {
setValue(val);
combobox.closeDropdown();
};
Target Types
| Scenario | Use |
|---|---|
| Button trigger (no text input) | <Combobox.Target targetType="button"> |
| Input trigger | <Combobox.Target> (default) |
| Pills + separate input (multi-select) | <Combobox.DropdownTarget> + <Combobox.EventsTarget> |
What Combobox does for you
- The target handles keyboard: ArrowUp/ArrowDown move the highlight and skip disabled options (and
open the dropdown when it is closed), Enter submits the highlighted option, Escape closes the
dropdown. With
targetType="button", Space and Enter also open it. Tab is not handled. - Enter does nothing when no option is highlighted, so a free-text input can handle it itself.
- Nothing is highlighted until the user presses an arrow key, unless you call
selectFirstOption()orselectActiveOption(). - Clicking an option does not move focus away from the input, and a disabled option never calls
onOptionSubmit. Combobox.Optionforwardsdata-*attributes and event handlers to its element.Combobox.Searchhandles the same keys as the target. Your ownonKeyDownon the target child or onCombobox.Searchis called first, then the built-in handling runs, so extra keys (PageUp, ArrowRight) can be added there. To take the keyboard over completely (a textarea, where arrows must move the caret), setwithKeyboardNavigation={false}onCombobox.Targetand callselectNextOption,selectPreviousOptionandclickSelectedOptionyourself.- Defaults: the dropdown is as wide as the target (
width="target"), rendered in a portal, kept mounted while closed, opens without animation, and hovering an option does not change the keyboard highlight. - Th
Установить mantine-combobox в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл mantine-combobox?
Build custom dropdown/select/autocomplete/multiselect components using Mantine's Combobox primitives. Use this skill when: (1) creating a new custom select-like component with Combobox primitives, (2) building a searchable dropdown, (3) implementing a multi-select or tags input variant, (4) customizing option rendering, (5) adding custom filtering logic, or (6) any task involving useCombobox, Combobox.Target, Combobox.Option, or Combobox.Dropdown.
Как установить скилл mantine-combobox?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mantine-combobox запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic