No Preview

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.

TextInput

A text input allow a user to enter and edit a text.

usage
import { TextInput, SearchInput, PasswordInput } from "@sharegate/orbit-ui";
sources
Github

Usage

Default

A default text input.

Editable example

Value

A text input can have a value.

Editable example

Icon

A text input can contain an icon.

Editable example

Button

A text input can contain a button.

Editable example

Disabled

A text input can be disabled.

Editable example

Readonly

A text input can be readonly.

Editable example

Loading

A text input can show that it is currently loading data.

Editable example

Fluid

A text input can take the width of its container.

Editable example

Validation

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.

Editable example

Controlled

A text input value can be handled in controlled mode.

Editable example

SearchInput

A specialized text input for search input.

Editable example

PasswordInput

A specialized text input which show / hide a password.

Editable example

API

TextInput

usage
import { TextInput } from "@sharegate/orbit-ui";
NameDescriptionDefault
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
eventReact's original event.
valueThe new input value.
-
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>>
-

SearchInput

usage
import { SearchInput } from "@sharegate/orbit-ui";
NameDescriptionDefault
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
eventReact's original event.
valueThe new input value.
-
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>>
-

PasswordInput

usage
import { PasswordInput } from "@sharegate/orbit-ui";
NameDescriptionDefault
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
eventReact's original event.
valueThe new input value.
-
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>>
-