Saltar al contenido
El Muestrario

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

9 props declaradas en los tipos de la versión instalada.
PropRequeridaTipoQué hace
placeholderopcionalstring—
classNameopcionalstring—
valueopcionalstringControlled 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.
onValueChangeopcional(v: string) => voidCalled with the new string on every keystroke when `value` is provided.
idopcionalstringid 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-activedescendantopcionalstringARIA: id of the currently highlighted option in an associated listbox.
aria-expandedopcionalbooleanARIA: whether the associated listbox is currently expanded.
aria-controlsopcionalstringARIA: id of the listbox this input controls.
onKeyDownopcionalReact__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.