Renders a loading spinner to the page

Downloads in past


1.2.1a year ago2 years agoMinified + gzip package size for @bliss-design-system/loading in KB


<bliss-loading> renders a loading spinner to the page. This component is normally used after an action was triggered to indicate a loading state. <bliss-loading> can be used independently or inside other components (e.g. buttons).
- Properties - Demoing with Storybook - Testing - Committing - Opening a merge request

📦 Installation

To install this component, run:
yarn add @bliss-design-system/loading

🏎 Usage

To use this component, you'll need to register the component to the window's Custom Elements Registry. In order to achieve that, you'll want to call this function within your application's client-facing entry file:
import { blissRegisterLoading } from '@bliss-design-system/loading';

blissRegisterLoading(); // Registers <bliss-loading>

That will make the component available in your application and you can use it like this:
<!-- Render a loading component at medium size -->


The component accepts the following properties:
| Property | Type | Description | Default | Required | Options | | --------------- |:--------------:| :---------------------------------:|:---------:|:--------:|:---------------------:| | size | String | Size of the loading component | medium | false | medium or large |


By default, <bliss-loading> will inherit the color property from its parent element. This means that if you are using a <bliss-loading> component inside of a button and the text color is red, then <bliss-loading> will inherit this color value and also be red. But, if you want to change the color of <bliss-loading>, add the following to your application's styles:
bliss-loading {
  color: blue;

🫕 Contributing

If you'd like to contribute, please open an issue with your suggested change on our Proposal Board. Once that is accepted, either the Bliss team will work on it or you can make changes locally by doing the following:
# Clone this repository
git clone https://gitlab.com/bliss-design-system/components.git

# Move into the component toolkit
cd components/

# Install the dependencies

You don't need to move into the package's directory to run storybook, tests or anything else. All of those commands exist in the root of the component toolkit, so while you can work on the component within its specific folder, you don't need to move through directories to run anything.

Demoing with Storybook

You can see all of your changes as you make them on Storybook.
To run a local instance of Storybook for this component, run:
yarn storybook


If you want to test as you develop, run:
yarn test

// or

yarn test:watch


We follow the Conventional Commits specification, meaning that you'll be prompted to fill out a descriptive message when you commit. We also use these commits to manage our releases, so we appreciate details.
As a guideline for this component, we use:
  • fix for bug fixes, minor stylistic improvements, etc.
  • feat for any backward compatible API changes.

For anything that breaks backwards compatibility or introduces significant changes that require a major version change, please get in touch with the team.

Opening a merge request

When you're ready to open a merge request, please use a descriptive title and fill out the provided template.
The team will be notified, but it helps to post your merge request in #blisssupport.

🙃 Troubleshooting

We'll fill this section out as we go and as issues are raised. But if you haven't found what you're looking for, get in touch via bliss@bryter.io or via the #blisssupport Slack channel ✨.