shoelace/docs/components/spinner.md

40 wiersze
920 B
Markdown
Czysty Zwykły widok Historia

2020-07-15 21:30:37 +00:00
# Spinner
[component-header:sl-spinner]
Spinners are used to show the progress of an indeterminate operation.
```html preview
<sl-spinner></sl-spinner>
```
## Examples
### Size
Spinners are sized relative to 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></sl-spinner>
<sl-spinner style="font-size: 2rem;"></sl-spinner>
<sl-spinner style="font-size: 3rem;"></sl-spinner>
```
### Stroke Width
The width of the spinner can be changed by setting the `--stroke-width` custom property.
```html preview
<sl-spinner style="font-size: 2rem; --stroke-width: 6px;"></sl-spinner>
```
### Color
The spinner's color can be changed by setting the `--color` custom property.
```html preview
2020-09-15 12:14:56 +00:00
<sl-spinner style="font-size: 2rem; --indicator-color: tomato;"></sl-spinner>
2020-07-15 21:30:37 +00:00
```
[component-metadata:sl-spinner]