Spinner
A spinner component used for the loading status of a page or a block.
Importing
To use the spinner component, first you need to register the component inside the page. You can register the component manually by importing the register function:
ts
import { register } from "@tapsioss/web-components/spinner";
register(); // Now the spinner component is ready to use!
ts
import { registerSpinner } from "@tapsioss/web-components";
registerSpinner(); // Now the spinner component is ready to use!
Also you can automatically register the component by importing it with the following approach:
ts
import "@tapsioss/web-components/spinner/element";
TIP
If you want to use all the component in your app, you can call registerAll
at the root of your project.
ts
import { registerAll } from "@tapsioss/web-components";
registerAll(); // All the components are now available
In the React package, you can easily add the component using the following code:
ts
import { Spinner } from "@tapsioss/react-components";
Component Usage
html
<tapsi-spinner></tapsi-spinner>
tsx
<Spinner />
Properties
Name | Attribute Name | Description | Type | Default Value |
---|---|---|---|---|
size | size | Determines the size of the spinner. When set to 'auto', it inherits the size of its parent element. Otherwise, you can specify the size in pixels. | | number | ${number} | "auto" | "auto" |