YuhuanStudioYunUIDocs
AI

Capability Selector

A controlled multi-select grid of toggleable model capabilities that adapts to the model type.

A multi-select grid of toggleable model capabilities. It is fully controlled — you own the selected array and update it from onChange. The option set adapts to modelType (defaults to the LLM set: chat, streaming, function calling, vision, thinking).

Import

import { CapabilitySelector } from "@yuhuanowo/yunui/ai";

Basic

Because it is controlled, hold the selection in state and pass it back via onChange.

Basic

Props

PropTypeDefaultDescription
columns2 | 3 | 44Grid column count.
disabledbooleanfalseDisable interaction and dim the control.
modelTypestringFilters which capability set is shown (e.g. "image_generation", "audio", "video"). Defaults to the LLM set.
onChange*(capabilities: string[]) => voidCalled with the next selection when a capability is toggled.
selected*string[]Currently selected capability keys (controlled).
size"sm" | "md"mdButton size: `sm` or `md` (default).

On this page