Input
Text input field for forms, search, and inline editing. Comes in outlined and plain variants with support for leading and trailing decorators.
Best for
Import
import { Input } from "@enadhq/enad-react-sdk/client/ui-resolver"When to use it
Use Input for search, form fields, and inline edits where the SDK should keep spacing, focus treatment, and invalid states consistent.
Choose outlined when the field needs a clear boundary inside a longer form. Choose plain when the field sits inside a denser toolbar, filter row, or lightweight editorial surface.
Composition notes
- Use
startSlotandendSlotfor icons, shortcuts, or compact status markers. - Keep decorators presentational. Screen reader labels and helper copy should stay outside the slot content.
- Pair the field with
Label, helper text, and error text in the surrounding layout instead of trying to bake those concerns into the input itself.
State and theming guidance
Input already includes focus, disabled, and invalid states. Prefer semantic tokens like --radius, --enad-input-height, and --enad-input-px over one-off utility overrides so the field stays aligned with the rest of the control system.
If a surface needs a lower-emphasis treatment, switch to variant="plain" before replacing borders or padding by hand. That keeps the behavior consistent while letting the page feel lighter.
Examples
Live examples you can edit directly in the sandbox.
Basic text input
The default outlined input works well for search fields, checkout forms, and account settings.
Variants
Compare outlined and plain to decide which one fits a full form field versus a lighter inline toolbar surface.
Decorators with start and end slots
Use decorators for search, status, or units without rebuilding the input shell from scratch.
Component Sets
Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | string | — | No description yet. |
| startSlot | string | — | No description yet. |
| endSlot | string | — | No description yet. |