Loader
Spinner
Use ASpinner
component to render a spinner. For adjusting size of the spinner you can use font size utilities or if you want to set it to fixed size then use width utilities em:w-5
. Spinner have aspect-square
so height will be matched.
You can also use spinner inline.
Components
Anu already integrated loading for components that requires loading.
Click me
Chocolate cake tiramisu donut
Ice cream sweet pie pie dessert sweet danish. Jelly jelly beans cupcake jelly-o chocolate bonbon chocolate bar.
Performance 🚀
If you don't use loading prop then loading
prop for these component will be undefined
. Anu will only render loader if loading
prop is other than undefined
. Hence, You won't get unwanted loader DOM if you aren't using loader.
Loader
You can use ALoader
component to create customer loader/blocking UI.
You can customize overlay color and opacity via CSS vars --a-loader-overlay-bg-c
& --a-loader-overlay-bg-opacity
respectively.
INFO
As ADrawer
& ADialog
is built on top of ACard
, you can pass loading
prop to these components and loader will work without any extra efforts.
Spinner Icon
Anu also provides convenient component ALoadingIcon
for satisfying your custom needs 😇
Slot and Typography
You can change the loader with the default slot.
Loader component uses ATypography
component for its typography.
Card title
Chocolate cake tiramisu donut
Ice cream sweet pie pie dessert sweet danish. Jelly jelly beans cupcake jelly-o chocolate bonbon chocolate bar.
Full page
You can display the loader component in a full page.
API
Toggle loading state
Display loader in full page mode
Tag to use for title of the component
Tag to use for subtitle of the component
Tag to use for text rendered via text
prop
Typography text content
Typography title
Typography subtitle