Skip to content

Input

Input

Wrap over the input elements.

jsx
import Input from 'intergalactic/input';
<Input />;
import Input from 'intergalactic/input';
<Input />;

InputProps

& & & {...}
NameTypeDescription
disabledbooleanSets the input and addons to the disabled state
sizeInput size
state"normal" | "invalid" | "valid"Sets the input state

Input.Value

This component represents the native tag input and accepts all its properties, such as value and onChange.

jsx
import Input from 'intergalactic/input';
<Input.Value />;
import Input from 'intergalactic/input';
<Input.Value />;

InputValueProps

& & & {...}
NameTypeDescription
valuestringInput value
defaultValuestringDefault value if `value` property is not provided
onChange(value: string, event: React.SyntheticEvent<>) => voidHandler for changing the value
disabledbooleanSets the input to the disabled state
readOnlybooleanSets the input to the read-only state
sizeInput size

Input.Addon

The addon inside the input (most often it is an icon) places the correct indent units depending on the size. The addon can be interactive.

When you click on Addon, the focus shifts to the input. You can cancel this by returning the return false in the onMouseDown handler.

jsx
import Input from 'intergalactic/input';
<Input.Addon />;
import Input from 'intergalactic/input';
<Input.Addon />;

InputAddonProps

& & {...}
NameTypeDescription
interactivebooleanAdds styles for interactive icons
disabledbooleanBlocks the addon
sizeInput size

Released under the MIT License.

Released under the MIT License.