DocsComponentsSpinner
Spinner
A loading indicator.
1 file
<div class="flex items-center gap-6">
<pb-ui.spinner />
<pb-ui.spinner class="size-6" />
<pb-ui.spinner class="size-8 text-muted-foreground" />
</div>Installation
pyblade-ui add spinner- Copy this file into your projectcomponents/ui/spinner.html
<svg role="status" aria-label="Loading" data-slot="spinner" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" {{ attributes.cn("size-4 animate-spin") }}><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg> - Update the path to fit your project
The
componentsfolder is the one set inpyblade.toml.
Usage
The tag <pb-ui.spinner> is available in all your templates.
<pb-ui.spinner class="size-6" />Examples
In a button
<div class="flex gap-2">
<pb-ui.button disabled><pb-ui.spinner /> Loading…</pb-ui.button>
<pb-ui.button variant="outline" disabled><pb-ui.spinner /> Sending</pb-ui.button>
</div>