Components
Input
A basic input field for user text entry.
Installation
npm install @mijn-ui/react-inputUsage
import { Input } from "@mijn-ui/react-input"<Input />Examples
Variants
Default
Underline
Danger
Disabled
Input with Icon
Input With Floating Label
Input Floating Label with Icon
API Reference
Standard element attributes are forwarded to the underlying component in addition to the props below.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "underline" | "danger" | "default" | Visual style of the input. |
startIcon | ReactNode | — | Element rendered at the start of the input. |
endIcon | ReactNode | — | Element rendered at the end of the input. |
disabled | boolean | false | Disable the input. |
unstyled | boolean | false | Opt out of the default styles to fully customize the component. |
classNames | object | — | Override classes per slot (see Style Slots below). |
className | string | — | Additional classes for the root element. |
Input Style Slots
| Slot Name | Targeted Component | Purpose |
|---|---|---|
base | Input | Styles the input component. |
wrapper | Input | Styles the wrapper around the input field. |
startIcon | Input | Styles the icon displayed before the input. |
endIcon | Input | Styles the icon displayed after the input. |
label | Input | Styles the input label. |