Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
A text input allow a user to enter and edit a text.
import { TextInput, SearchInput, PasswordInput } from "@sharegate/orbit-ui";
A default text input.
A text input can have a value.
A text input can contain an icon.
A text input can contain a button.
A text input can be disabled.
A text input can be readonly.
A text input can show that it is currently loading data.
A text input can take the width of its container.
A text input can display a validation state to communicate to the user whether the current value is valid or invalid. Implement your own validation logic in your app and pass either "valid"
or "invalid"
to the input via the validationState
prop.
The example below illustrates how one would validate if the user has entered a valid email.
A text input value
can be handled in controlled mode.
A specialized text input for search input.
A specialized text input which show / hide a password.
import { TextInput } from "@sharegate/orbit-ui";
Name | Description | Default | ||||
---|---|---|---|---|---|---|
autoFocus | Whether or not the input should autoFocus on render. numberfalsetrue | - | ||||
button | Button component rendered after the value. ReactElement<any, string | JSXElementConstructor<any>> | - | ||||
fluid | Whether or not the input take up the width of its container. false | true | ResponsiveValue<boolean> | - | ||||
icon | Icon component rendered before the value. ReactElement<any, string | JSXElementConstructor<any>> | - | ||||
loading | Whether or not to render a loader. falsetrue | - | ||||
onValueChange | Called when the input value change. (event: ChangeEvent<HTMLInputElement>, value: string) => void
| - | ||||
type | The type of the input. "text""search""tel""url""email""password" | - | ||||
validationState | Whether or not the input should display as "valid" or "invalid". "valid""invalid" | - | ||||
value | A controlled value. string | - | ||||
wrapperProps | Additional props to render on the wrapper element. Partial<OmitInternalProps<InnerBoxProps, never> & RefAttributes<any>> | - |
import { SearchInput } from "@sharegate/orbit-ui";
Name | Description | Default | ||||
---|---|---|---|---|---|---|
autoFocus | Whether or not the input should autoFocus on render. numberfalsetrue | - | ||||
button | Button component rendered after the value. ReactElement<any, string | JSXElementConstructor<any>> | - | ||||
fluid | Whether or not the input take up the width of its container. false | true | ResponsiveValue<boolean> | - | ||||
icon | Icon component rendered before the value. ReactElement<any, string | JSXElementConstructor<any>> | - | ||||
loading | Whether or not to render a loader. falsetrue | - | ||||
onValueChange | Called when the input value change. (event: SyntheticEvent<Element, Event>, value: string) => void
| - | ||||
validationState | Whether or not the input should display as "valid" or "invalid". "valid""invalid" | - | ||||
value | A controlled value. string | - | ||||
wrapperProps | Additional props to render on the wrapper element. Partial<OmitInternalProps<InnerBoxProps, never> & RefAttributes<any>> | - |
import { PasswordInput } from "@sharegate/orbit-ui";
Name | Description | Default | ||||
---|---|---|---|---|---|---|
autoFocus | Whether or not the input should autoFocus on render. numberfalsetrue | - | ||||
button | Button component rendered after the value. ReactElement<any, string | JSXElementConstructor<any>> | - | ||||
fluid | Whether or not the input take up the width of its container. false | true | ResponsiveValue<boolean> | - | ||||
icon | Icon component rendered before the value. ReactElement<any, string | JSXElementConstructor<any>> | - | ||||
loading | Whether or not to render a loader. falsetrue | - | ||||
onValueChange | Called when the input value change. (event: ChangeEvent<HTMLInputElement>, value: string) => void
| - | ||||
validationState | Whether or not the input should display as "valid" or "invalid". "valid""invalid" | - | ||||
value | A controlled value. string | - | ||||
wrapperProps | Additional props to render on the wrapper element. Partial<OmitInternalProps<InnerBoxProps, never> & RefAttributes<any>> | - |