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.

InputGroup

An input group combines an input component with addons.

usage
import { InputGroup, TextAddon, InputGroupContext, useInputGroupProps, useInputGroupAddonProps } from "@sharegate/orbit-ui";
sources
Github

Usage

An input group can combine an input with a start addon, an end addon or both. All Orbit's input can be combined, you can even make it work with a custom input.

Default

A default input group.

days
Editable example

Inputs

An input group can use any Orbit's input component.

https://
passengers
Editable example

Text addon

An input group can have a textual addon to offer additional hints. A text addon shouldn't replace a field label or a field description.

https://
.space
Editable example

An input group can have a menu addon.

Editable example

Select addon

An input group can have a select addon.

Editable example

Disabled

An input group can set as disabled the input and the addon(s).

Editable example

Readonly

An input group can set as readonly the input and the addon(s).

Editable example

Fluid

An input group can take the width of its container.

https://
.space
Editable example

Custom input

Any input implementing the InputGroupContext can integrate with an input group component. This is usually done by using the useInputGroupProps hook.

passengers
Editable example

Custom addon

Any addon implementing the InputGroupContext can integrate with an input group component. This is usually done by using the useInputGroupAddonProps hook.

.space
Editable example

API

InputGroup

usage
import { InputGroup } from "@sharegate/orbit-ui";
NameDescriptionDefault
children*
React children.
string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal
-
disabled
Whether or not the input group is disabled.
falsetrue
-
fluid
Whether or not the input group take up the width of its container.
false | true | ResponsiveValue<boolean>
-
readOnly
Whether or not the input group is readonly.
falsetrue
-

TextAddon

usage
import { TextAddon } from "@sharegate/orbit-ui";
NameDescriptionDefault
children*
React children.
string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal
-