Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development
Input

Inputs are fields used to get user inputs.

Example
Code

Usage

Import the component


_10
import { Input } from "@faststore/ui";

Import styles

To apply styles, include the following in your stylesheet:

_10
@import "@faststore/ui/src/components/atoms/Input/styles.scss";


Examples

Disabled

Example
Code

Design tokens

Local tokenDefault value/Global token linked
--fs-input-paddingvar(--fs-spacing-1) var(--fs-spacing-2)
--fs-input-heightvar(--fs-control-tap-size)
--fs-input-bkg-colorvar(--fs-color-body-bkg)
--fs-input-box-shadownone
--fs-input-box-shadow-hover0 0 0 var(--fs-border-width) var(--fs-border-color-active)
--fs-input-text-color
var(--fs-color-text)
--fs-input-text-sizevar(--fs-text-size-body)
--fs-input-line-height1.25
--fs-input-transition-functionvar(--fs-transition-function)
--fs-input-transition-propertyvar(--fs-transition-property)
--fs-input-transition-timingvar(--fs-transition-timing)

Design tokens: Disabled

Local tokenDefault value/Global token linked
--fs-input-disabled-bkg-color
var(--fs-color-disabled-bkg)
--fs-input-disabled-text-color
var(--fs-color-disabled-text)
--fs-input-disabled-border-width
var(--fs-border-width)
--fs-input-disabled-border-color
var(--fs-border-color)

Data attributes

You can target and override Input styles using the following data attributes:
data-fs-input

Props

NameTypeDescriptionDefault
testIdstringID to find this component in testing tools (e.g.: cypress, testing library, and jest).fs-input

Best Practices

✅ Do's

  • Provide a Label when using input. Descriptive labels help users understand the purpose of a form control.

Contributors
2
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
On this page