Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development
Loader

Loaders provide a visual cue that an action is being processed.

Example
Code

Usage

Import the component


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

Import styles

To apply styles, include the following in your stylesheet:

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


Examples

Variants

Dark (Default)

Example
Code

Light

Example
Code

Design tokens

Local tokenDefault value/Global token linked
--fs-loader-gapvar(--fs-spacing-0)
--fs-loader-animation-functionvar(--fs-transition-function)
--fs-loader-animation-timingvar(--fs-transition-timing)

Design tokens: Loader item

Local tokenDefault value/Global token linked
--fs-loader-item-widthvar(--fs-spacing-0)
--fs-loader-item-heightvar(--fs-loader-item-width)
--fs-loader-item-border-radiusvar(--fs-border-radius-circle)
--fs-loader-item-initial-opacity.6

Design tokens: Dark

Local tokenDefault value/Global token linked
--fs-loader-dark-item-bkg-color
var(--fs-color-primary-bkg-active)

Design tokens: Light

Local tokenDefault value/Global token linked
--fs-loader-light-item-bkg-color
var(--fs-color-tertiary-bkg-light)

Data attributes

You can target and override Loader styles using the following data attributes:
data-fs-loader
data-fs-loader-variant="light" | "dark"

Props

NameTypeDescriptionDefault
testIdstringID to find this component in testing tools (e.g.: cypress, testing library, and jest).fs-loader
variant"light" | "dark"Specifies the component color variant.dark

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