forked from shoelace-style/shoelace
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
133 changed files
with
5,710 additions
and
4,898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
meta: | ||
title: Spinner ViUR | ||
description: Spinners are used to show the progress of an indeterminate operation. | ||
layout: component | ||
--- | ||
|
||
```html:preview | ||
<sl-spinner-viur></sl-spinner-viur> | ||
``` | ||
{% raw %} | ||
```jsx:react | ||
import { SlSpinnerViur } from '@shoelace-style/shoelace/dist/react'; | ||
const App = () => ( | ||
<SlSpinnerViur /> | ||
); | ||
``` | ||
{% endraw %} | ||
## Examples | ||
|
||
### Size | ||
|
||
Spinners are sized based on the current font size. To change their size, set the `font-size` property on the spinner itself or on a parent element as shown below. | ||
|
||
```html:preview | ||
<sl-spinner-viur></sl-spinner-viur> | ||
<sl-spinner-viur style="font-size: 2rem;"></sl-spinner-viur> | ||
<sl-spinner-viur style="font-size: 3rem;"></sl-spinner-viur> | ||
``` | ||
{% raw %} | ||
```jsx:react | ||
import { SlSpinnerViur } from '@shoelace-style/shoelace/dist/react'; | ||
const App = () => ( | ||
<> | ||
<SlSpinnerViur /> | ||
<SlSpinnerViur style={{ fontSize: '2rem' }} /> | ||
<SlSpinnerViur style={{ fontSize: '3rem' }} /> | ||
</> | ||
); | ||
``` | ||
{% endraw %} | ||
### Color | ||
|
||
The spinner's colors can be changed by setting the `--indicator-color` | ||
|
||
```html:preview | ||
<sl-spinner-viur style="font-size: 3rem; --indicator-color: deeppink"></sl-spinner> | ||
``` | ||
{% raw %} | ||
```jsx:react | ||
import { SlSpinnerViur } from '@shoelace-style/shoelace/dist/react'; | ||
const App = () => ( | ||
<SlSpinnerViur | ||
style={{ | ||
fontSize: '3rem', | ||
'--indicator-color': 'deeppink' | ||
}} | ||
/> | ||
); | ||
``` | ||
{% endraw %} | ||
### Speed | ||
|
||
The spinner's speed can be changed by setting the `--speed` | ||
|
||
```html:preview | ||
<sl-spinner-viur style="font-size: 2rem; --speed: .5s"></sl-spinner> | ||
``` | ||
{% raw %} | ||
```jsx:react | ||
import { SlSpinnerViur } from '@shoelace-style/shoelace/dist/react'; | ||
const App = () => ( | ||
<SlSpinnerViur | ||
style={{ | ||
fontSize: '2rem', | ||
'--speed': '.5s' | ||
}} | ||
/> | ||
); | ||
``` | ||
{% endraw %} |
Oops, something went wrong.