InputIcon
Loading example…
InputIcon is part of the Forms set, imported from @jcsoftdev/ui/forms.
Import
Section titled “Import”import { InputIcon } from "@jcsoftdev/ui/forms";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/forms/input-icon.
<InputIcon icon={<Search />} placeholder="Buscar cliente o servicio" aria-label="Buscar"/>| Prop | Type | Default | Description |
|---|---|---|---|
classNames |
Partial<Record<InputIconPart, string>> |
Per-part classes merged with cn; consumer classes win. className still targets the input and is merged last. |
|
icon * |
ReactNode |
Leading icon element (e.g. an @jcsoftdev/ui/icons icon). |
|
size |
"sm" | "md" | "lg" | "xs" |
sm is the 30px compact field and md (default) the 38px one: the heights of Button sm and md. xs is the same as sm; lg is the thumb-friendly field. |
|
intent |
string |
||
intentKey |
string |
||
variant |
"default" | "bare" |
bare drops the border, background and side padding, for a field that sits inside chrome of its own. |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/forms/input-icon/input-icon.tsx