Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextInput v11 Styles #1889

662 changes: 405 additions & 257 deletions COMPONENT_INDEX.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

232 changes: 151 additions & 81 deletions docs/src/COMPONENT_API.json

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions docs/src/pages/components/TextInput.svx
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,51 @@ components: ["TextInput", "TextInputSkeleton"]

## Default

<TextInput labelText="User name" placeholder="Enter user name..." />
<TextInput labelText="Username" placeholder="Enter username..." />

## With helper text

<TextInput labelText="User name" helperText="Your user name is associated with your email" placeholder="Enter user name..." />
<TextInput labelText="Username" helperText="Your username is associated with your email" placeholder="Enter username..." />

## Hidden label

<TextInput hideLabel labelText="User name" placeholder="Enter user name..." />
<TextInput hideLabel labelText="Username" placeholder="Enter username..." />

## Light variant

<TextInput light labelText="User name" placeholder="Enter user name..." />
<TextInput light labelText="Username" placeholder="Enter username..." />

## Inline variant

<TextInput inline labelText="User name" placeholder="Enter user name..." />
<TextInput inline labelText="Username" placeholder="Enter username..." />

## Read-only variant

<TextInput readonly labelText="User name" value="IBM" />
<TextInput readonly labelText="Username" value="IBM" />

## Large size

<TextInput size="lg" labelText="User name" placeholder="Enter user name..." />
<TextInput size="lg" labelText="Username" placeholder="Enter username..." />

## Small size

<TextInput size="sm" labelText="User name" placeholder="Enter user name..." />
<TextInput size="sm" labelText="Username" placeholder="Enter username..." />

## Character Counter

<TextInput labelText="Username" placeholder="Enter username..." maxCount={32} counter />

SimpleProgrammingAU marked this conversation as resolved.
Show resolved Hide resolved
## Invalid state

<TextInput invalid invalidText="User name is already taken. Please try another." labelText="User name" placeholder="Enter user name..." />
<TextInput invalid invalidText="Username is already taken. Please try another." labelText="Username" placeholder="Enter username..." />

## Warning state

<TextInput warn warnText="Your user name is different from your log in ID." labelText="User name" placeholder="Enter user name..." />
<TextInput warn warnText="Your username is different from your log in ID." labelText="Username" placeholder="Enter username..." />

## Disabled state

<TextInput disabled labelText="User name" placeholder="Enter user name..." />
<TextInput disabled labelText="Username" placeholder="Enter username..." />

## Skeleton

Expand Down
Loading