# Spinner Spinner component is a visual indicator used to represent loading, processing or system activity. It provides feedback to users that an operation is in progress and helps prevent confusion when waiting for content to load. **Category:** Components **Storybook:** https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-spinner--introduction ## Variants documented in Storybook - SpinnerTypes: https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-spinner--spinnertypes - SpinnerSizes: https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-spinner--spinnersizes ## Framework setup ### HTML / CDN ```html ``` ### React ```bash npm install ux4g-web-components ``` ```jsx import 'ux4g-web-components/styles.css'; import 'ux4g-web-components/design-system'; ``` ### Angular Update `angular.json`: ```json { "styles": [ "node_modules/ux4g-web-components/styles/ux4g.css", "src/styles.css" ], "scripts": [ "node_modules/ux4g-web-components/dist/runtime/design-system.js" ] } ``` ## Code examples The snippets below are extracted from the Storybook canvas for Spinner. Each example shows the rendered HTML, the equivalent React JSX, and the Angular template markup. ### 1. Introduction — Introduction HTML: ```html
Spinner component is a visual indicator used to represent loading, processing or system activity. It provides feedback to users that an operation is in progress and helps prevent confusion when waiting for content to load.
Explore the core styles and animation variants available in the design system.
Quickly copy semantic and scale classes for Spinners.
| Intent | Classes |
|---|---|
| primary |
ux4g-spinner-primary-full
ux4g-spinner-primary-split
ux4g-spinner-primary-partial
|
| inverse |
ux4g-spinner-inverse-full
ux4g-spinner-inverse-split
ux4g-spinner-inverse-partial
|
| danger |
ux4g-spinner-danger-full
ux4g-spinner-danger-split
ux4g-spinner-danger-partial
|
| Size Name | Utility Class |
|---|---|
| Extra Large |
ux4g-spinner-xl
|
| Large |
ux4g-spinner-lg
|
| Medium |
ux4g-spinner-md
|
| Small |
ux4g-spinner-sm
|
| Extra Small |
ux4g-spinner-xs
|
Spinner component is a visual indicator used to represent loading, processing or system activity. It provides feedback to users that an operation is in progress and helps prevent confusion when waiting for content to load.
Explore the core styles and animation variants available in the design system.
Quickly copy semantic and scale classes for Spinners.
| Intent | Classes |
|---|---|
| primary |
ux4g-spinner-primary-full
ux4g-spinner-primary-split
ux4g-spinner-primary-partial
|
| inverse |
ux4g-spinner-inverse-full
ux4g-spinner-inverse-split
ux4g-spinner-inverse-partial
|
| danger |
ux4g-spinner-danger-full
ux4g-spinner-danger-split
ux4g-spinner-danger-partial
|
| Size Name | Utility Class |
|---|---|
| Extra Large |
ux4g-spinner-xl
|
| Large |
ux4g-spinner-lg
|
| Medium |
ux4g-spinner-md
|
| Small |
ux4g-spinner-sm
|
| Extra Small |
ux4g-spinner-xs
|
Spinner component is a visual indicator used to represent loading, processing or system activity. It provides feedback to users that an operation is in progress and helps prevent confusion when waiting for content to load.
Explore the core styles and animation variants available in the design system.
Quickly copy semantic and scale classes for Spinners.
| Intent | Classes |
|---|---|
| primary |
ux4g-spinner-primary-full
ux4g-spinner-primary-split
ux4g-spinner-primary-partial
|
| inverse |
ux4g-spinner-inverse-full
ux4g-spinner-inverse-split
ux4g-spinner-inverse-partial
|
| danger |
ux4g-spinner-danger-full
ux4g-spinner-danger-split
ux4g-spinner-danger-partial
|
| Size Name | Utility Class |
|---|---|
| Extra Large |
ux4g-spinner-xl
|
| Large |
ux4g-spinner-lg
|
| Medium |
ux4g-spinner-md
|
| Small |
ux4g-spinner-sm
|
| Extra Small |
ux4g-spinner-xs
|