npx gluestack-ui add inputimport { Input } from '@/components/ui/input';
export default () => (
<Input>
<InputField />
<InputSlot>
<InputIcon>{/* Some Icon Component */}</InputIcon>
</InputSlot>
</Input>
);
| Platform | Output |
|---|---|
Web | <input /> |
Native | <TextInput /> |
| Prop | Type | Default | Description |
|---|---|---|---|
isInvalid | boolean | false | When true, the input displays an error state |
isDisabled | boolean | false | When true, the input is disabled and cannot be edited |
isHovered | boolean | false | When true, the input displays a hover state |
isFocused | boolean | false | When true, the input displays a focus state |
isRequired | boolean | false | If true, sets aria-required="true" on the input |
isReadOnly | boolean | false | If true, the input value cannot be edited |
size | xl | lg | md | sm | md | The size of the input |
variant | underlined | outline | rounded | outline | The variant of the input |