inputs
Textfield
Text inputs enable the user to interact with and input content and data.
Features
- Keyboard accessible
- Can contain icons
- Multiple sizes
- Value format validation
- Can be rendered as textarea
- Themes ready
Anatomy
import { Textfield } from "@wonderflow/react-components";
export default () => {
return (
<Textfield
type="text"
label="Filled"
message="Text hint sample"
defaultValue="Prefilled value"
placeholder="Optional placeholder"
/>
);
};API Reference
PROPERTY
TYPE
DEFAULT
iconenumiconPositionenumrightlabelstringtextareabooleanmessagestringdimensionenumregularreadOnlybooleanfullWidthbooleandisabledbooleanfalseinvalidbooleanminRowsnumber4maxRowsnumber6valuestringdefaultValuestringplaceholderstringtypestringonChangefunctionAccessibility
The Textfield component requires an associated label element and id to describes the field. You can use the label and id properties or add a custom external label.
Keyboard interactions
| Name | Description |
|---|---|
| tab | Move focus on the element or outside |