Skip to content

Text Input

A standard text input component - a one-line input used for general text, emails, passwords etc. Can optionally be given a label.

See all the examples and details in the Storybook.

Usage

tsx
import { TextInput } from "@samgl/graffiti-ui";

const MyTextInput = () => {
  return <TextInput label="Username" />;
};

Props

PropTypeDefaultOptionalDescription
labelstringThe label to display next to the text input.
classNamestringThe class name of the component, generally used when extending the component with a styled component.

All other props will also be passed to the underlying input element. You can pass the type prop to change the type of the input, for example type="password" to make the input an password input.