mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
docs: add new component docs
This commit is contained in:
parent
c2fb2d213d
commit
2008d0035f
130 changed files with 6662 additions and 3801 deletions
48
docs/src/pages/components/TextInput.svx
Normal file
48
docs/src/pages/components/TextInput.svx
Normal file
|
@ -0,0 +1,48 @@
|
|||
<script>
|
||||
import { TextInput, TextInputSkeleton } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
### Default
|
||||
|
||||
<TextInput labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### With helper text
|
||||
|
||||
<TextInput labelText="User name" helperText="Your user name is associated with your email" placeholder="Enter user name..." />
|
||||
|
||||
### Hidden label
|
||||
|
||||
<TextInput hideLabel labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### Light variant
|
||||
|
||||
<TextInput light labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### Inline
|
||||
|
||||
<TextInput inline labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### Extra-large size
|
||||
|
||||
<TextInput size="xl" labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### Small size
|
||||
|
||||
<TextInput size="sm" labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### Invalid state
|
||||
|
||||
<TextInput invalid invalidText="User name is already taken. Please try another." labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### Disabled state
|
||||
|
||||
<TextInput disabled labelText="User name" placeholder="Enter user name..." />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<TextInputSkeleton />
|
||||
|
||||
### Skeleton without label
|
||||
|
||||
<TextInputSkeleton hideLabel />
|
Loading…
Add table
Add a link
Reference in a new issue