Skip to Content
Documentation
Saas UI
Get Pro
Getting started
Components
Overview

Input

Used to get user input in a text field.

SourceStorybookRecipe

Anatomy

import { Input } from '@saas-ui/react'
<Input placeholder="..." />

Examples

Variants

Use the variant prop to change the visual style of the input.

Sizes

Use the size prop to change the size of the input.

Helper Text

Pair the input with the Field component to add helper text.

We'll never share your email.

Error Text

Pair the input with the Field component to add error text.

This field is required

Field

Compose the input with the Field component to add a label, helper text, and error text.

Left and Right Element

Pair the input with the InputElement component to add an element to the left or right of the input.

https://
⌘K
https://

Addon

Use the InputAddon and Group components to add an addon to the input.

https://
.com

Disabled

Use the disabled prop to disable the input.

Placeholder Style

Use the _placeholder prop to style the placeholder text.

Props

PropDefaultType
colorPalette 'gray'
'gray' | 'zinc' | 'neutral' | 'stone' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'presence' | 'status' | 'sidebar' | 'sidebar.accent' | 'accent' | 'slate'

The color palette of the component

size 'md'
'xs' | 'sm' | 'md' | 'lg' | 'xl'

The size of the component

variant 'outline'
'outline' | 'subtle' | 'flushed'

The variant of the component

placeholder
React.ReactNode

Previous

Image

Next

Menu