Skip to content
On this page

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.

Heartbeat

Made with love with Anu

Full page

You can display the loader component in a full page.

API

Loader

loading : boolean

Toggle loading state

fullPage : boolean

Display loader in full page mode

titleTag : string

Tag to use for title of the component

subtitleTag : string

Tag to use for subtitle of the component

textTag : string

Tag to use for text rendered via text prop

text : ConfigurableValue

Typography text content

title : ConfigurableValue

Typography title

subtitle : ConfigurableValue

Typography subtitle

default : any

Default slot for rendering loader content. ATypography content like title & subtitle will be rendered along with this slot.

title : any

Render custom content for title

subtitle : any

Render custom content for subtitle

header-right : any

Render custom content on right side of title & subtitle. Content inside this slot will be vertically centered to title & subtitle.

Released under the MIT License.