componente · @solu30/ui-kit/feedback
CommandInput
Campo de búsqueda de una lista de comandos; va adentro de Command o de CommandDialog.
7 sitios de import en 3 de 15 verticales — un archivo que la importa cuenta una vez, monte una instancia o veinte.
- cmp-packages
- gestorsalon
- luigi
El componente, montado
Cargando el componente del paquete instalado…
Cómo se usa
import { CommandInput } from '@solu30/ui-kit/feedback'Props
| Prop | Requerida | Tipo | Qué hace |
|---|---|---|---|
| placeholder | opcional | string | — |
| className | opcional | string | — |
| value | opcional | string | Controlled value for this input. When provided, the input is controlled and `onValueChange` should be supplied to handle updates. When omitted, the parent `Command` context manages the search value internally. |
| onValueChange | opcional | (v: string) => void | Called with the new string on every keystroke when `value` is provided. |
| id | opcional | string | id forwarded to the underlying <input>. Optional — lets a consumer pair an external <label htmlFor> or wire aria-activedescendant from a sibling listbox (ADR-143, added for @solu30/ui-kit Combobox). |
| aria-activedescendant | opcional | string | ARIA: id of the currently highlighted option in an associated listbox. |
| aria-expanded | opcional | boolean | ARIA: whether the associated listbox is currently expanded. |
| aria-controls | opcional | string | ARIA: id of the listbox this input controls. |
| onKeyDown | opcional | React__default.KeyboardEventHandler<HTMLInputElement> | Forwarded to the underlying <input>. Composed with the standalone Command kit's own convention (panel-level keydown, see Select.tsx) — most consumers should keep navigation on an ancestor and leave this unset; it exists for callers that need input-level interception. |
Ejemplo del paquete
// Sin `value` la búsqueda la maneja el Command padre. Con `value` + `onValueChange`, el consumidor.
<CommandInput placeholder="Buscar salón…" />Del @example del JSDoc de @solu30/ui-kit, sin editar: son 65 de los 541 símbolos. La sangría y los renglones en blanco son los del paquete.