Slug input allows user to enter a slug for a resource they're creating, for example a new workspace.
Show a prefix before the input to hint where the slug would be used via prefix prop.
Input should be disabled, when it shouldn't be allowed to be interacted with.
Compared to a disabled input, read only input is usually used for values that user might want to copy to clipboard.
SlugInput supports three states of validation via validationState prop:
"validating" - Slug is being validated."valid" - Slug is valid."invalid" - Slug is invalid.The size prop impacts font-size and height. Default is set to md.
To set the width, use the width prop instead.
Inherits margin props.
| Name | Default | Description |
|---|---|---|
isDisabled | — | booleanDetermines whether input is disabled and doesn't respond to any user interactions. |
isReadOnly | — | booleanDetermines whether input can be interacted with, but value can't be changed. |
isRequired | — | booleanIndicates that input is required to fill out. |
prefix | — | stringPrefix to show before the value. |
value | — | stringInput value. |
validationState | — | "validating" | "invalid" | "valid"Validation state. |
width | "xs" | "xs" | "sm" | "md" | "lg" | "auto" | "100%"Input width. |
size | "md" | "sm" | "md" | "lg"Input size. |