Foundations
Icons
Actions
Buttons
Form Controls
Input
Text Area
Select Dropdown
Filter Dropdown
Checkbox
Radio Button
Switch
File Uploader
Color Picker
Multi Select
Search Input
Slider
OTP Input
Date Picker
Time Picker
Date Range Picker
Data Display
Table
Pagination
Progress Bar
Stat Card
Circular Progress
Navigation
Side Menu
Menu Bar
Tabs
Breadcrumb
Ellipsis
Content & Layout
Card
Divider
Banner
Carousel
Accordion
Timeline
Stepper
List
Overlays
Modal
Drawer
Popover
Command Palette
Dropdown Menu
Context Menu
Indicators
Tags
Chips
Badge
Avatar
Avatar Group
Tooltip
Skeleton
Spinner
Feedback
Snackbar
Alert
Callout
State
Input
stringCurrent text. Controlled: update it from onChange.
—stringLabel above the field. Also names the field for screen readers.
—stringHint shown while the field is empty.
""FORM_ELEMENT_SIZEField height. SM for dense layouts.
FORM_ELEMENT_SIZE.MDFORM_ELEMENT_EDGE_STYLECorner style.
FORM_ELEMENT_EDGE_STYLE.ROUNDED"text" | "email" | "password" | "number" | "search" | "tel" | "url"Native input type.
"text"booleanBlocks input and dims the field.
falsebooleanAdds an asterisk to the label and marks the field as required.
falsebooleanShows the error style. Turns on errorMessage.
false(e: ChangeEvent<HTMLInputElement>) => voidNative change event. Read the text from e.target.value.
—() => voidAdds a clear button while there's a value. Called when it's clicked.
—stringExtra classes on the wrapper, e.g. a width.
""stringExtra classes on the field itself.
""Also accepts global HTML attributes and event handlers (id, aria-*, onBlur, onKeyDown…), passed to the <input>.
import { useState } from "react";
import { Input } from "gwan-design-system";
const Example = () => {
const [value, setValue] = useState("");
return (
<Input
value={value}
label="Email"
placeholder="you@example.com"
onChange={(e) => setValue(e.target.value)}
/>
);
};