Spinner
Show that something is loading with a rotating icon, when you can't tell how long it will take.
Installation
Usage
- The spinner turns once every 1.6 seconds, for as long as it's on screen.
- It's drawn with Lynx's
<svg>element, which can't read your CSS. Passcoloras a literal color, such as#3b82f6orrgba(…). A theme variable such asvar(--primary)won't work there. - Without
color, the icon keeps the SVG'scurrentColorstroke, which doesn't follow your theme. Setcolorwhenever the spinner sits on a dark background or the app has dark mode. - It has no
classinput. Wrap it in a<view>to position it.
Sizes
xs is 16px, sm 20px, md 24px and lg 32px.
In a button
Button shows a spinner in place of its label while loading is true, so you don't need to add one yourself.
API
UiSpinner
No outputs.
