Spinner
The VSpinner component is a spinning loader used to indicate that content is loading.
Usage
Basic Usage
To use the VSpinner component, simply include it in your template:
INFO
The VSpinner component is registered globally when you install with @morpheme/ui. So you don't need to import it manually.
Colors
You can customize the color of the spinner using the color prop. This prop accepts a string value corresponding to one of the available colors. The default value is default.
- prop:
color - type:
string - default: ``
- required:
false
Use color to different color style to the spinner.
Size
You can customize the size of the spinner using the xSmall, small, large, or xLarge prop. These props are boolean values and should be set to true to activate the corresponding size. The default size is medium.
Props
| Name | Type | Default |
|---|---|---|
| color | string , available colors | default |
| xSmall | boolean | false |
| small | boolean | false |
| large | boolean | false |
| xLarge | boolean | false |
Standalone Installation
You can also install the Spinner component individually via @morpheme/spnner package:
npm i @morpheme/spinnernpm i @morpheme/spinner<script setup lang="ts">
import VSpinner from '@morpheme/spinner';
</script>
<template>
<VSpinner />
</template><script setup lang="ts">
import VSpinner from '@morpheme/spinner';
</script>
<template>
<VSpinner />
</template>Storybook
View Storybook documentation here.
Morpheme