Slug Input

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:

  1. "validating" - Slug is being validated.
  2. "valid" - Slug is valid.
  3. "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.

#

#

  • Use sentence case for placeholder text.
  • End placeholder text with three dots.

#

Inherits margin props.

NameDefaultDescription
isDisabled

boolean

Determines whether input is disabled and doesn't respond to any user interactions.

isReadOnly

boolean

Determines whether input can be interacted with, but value can't be changed.

isRequired

boolean

Indicates that input is required to fill out.

prefix

string

Prefix to show before the value.

value

string

Input value.

validationState

"validating" | "invalid" | "valid"

Validation state.

width"xs""xs" | "sm" | "md" | "lg" | "auto" | "100%"

Input width.

size"md""sm" | "md" | "lg"

Input size.

On this page

  • Example
  • Usage
  • Prefix
  • Disabled
  • Read only
  • Validation
  • Size
  • Guidelines
  • Content
  • Props