10 · Feedback
Aura
mode spin/dual/glow × tone (7) · width xs–lg · radius default/pill/r12 · shadow
A ring of light that runs along the border of any element while something works in the background.
mode
mode="spin"mode="dual"mode="glow"
.heex
<div class="flex flex-wrap items-center gap-4"> <.aura :for={m <- ~w(spin dual glow)} mode={m} tone="ai"><span class="block bg-panel px-4 py-3 text-[13.5px] whitespace-nowrap">mode="{m}"</span></.aura> </div>
tone
accentaiinfoposwarnnegviolet
.heex
<div class="flex flex-wrap items-center gap-3"> <.aura :for={t <- ~w(accent ai info pos warn neg violet)} tone={t}><span class="block bg-panel px-4 py-3 text-[13.5px] whitespace-nowrap">{t}</span></.aura> </div>
width · radius · shadow
width=xswidth=smwidth=defaultwidth=lg
r12 + shadow
.heex
<div class="flex flex-wrap items-center gap-4"> <.aura :for={w <- ~w(xs sm default lg)} tone="ai" width={w}><span class="block bg-panel px-4 py-3 text-[13.5px] whitespace-nowrap">width={w}</span></.aura> <.aura tone="ai" width="sm" radius="pill"><.button color="neutral" variant="solid" size="md" shape="pill"><.icon name="sparkles" />Resumir com IA</.button></.aura> <.aura tone="accent" radius="r12" shadow><span class="block bg-panel px-4 py-3 text-[13.5px] whitespace-nowrap">r12 + shadow</span></.aura> </div>
Usage
<.aura tone="ai"><.toast_card title="Lendo a nota" /></.aura> <.aura tone="ai" radius="pill" width="sm"><.button>Resumir</.button></.aura> <.aura mode="glow" tone="warn" shadow>…precisa de você…</.aura>
Rules
spin: a light turns while working;dual: two colors for a ready result;glow: pulses (needs the person).tone: accent, ai (teal + violet), info, pos, warn, neg, violet. It stops turning withprefers-reduced-motion.
API reference
Todos os function components, atributos, valores e slots que este componente cobre.
Ring of light that runs along the border of any element while something works in the background.
Styled only with Tailwind utilities; the light is a ::before cone that turns (lu-aura-spin).
<.aura tone="ai"><.toast_card title="Reading the invoice" /></.aura>
<.aura tone="ai" radius="pill" width="sm"><button>Summarize</button></.aura>
<.aura mode="glow" tone="warn" shadow>…needs you…</.aura>
mode is spin (a light turns while it works), dual (two colours, a result is ready) or
glow (pulses when it needs the person). tone picks the light (ai is the assistant's teal
and violet).
<.aura>
| Attr | Type | Default | Values / notes |
|---|---|---|---|
mode |
:string |
"spin" |
spin, dual, glow |
motion |
:string |
nil |
nil, spin, dual, glow - Alias of mode. |
tone |
:string |
"accent" |
accent, ai, info, pos, warn, neg, violet |
width |
:string |
"default" |
xs, sm, default, lg |
radius |
:string |
"default" |
default, pill, r12 |
shadow |
:boolean |
false |
|
class |
:any |
nil |
Any other HTML/phx attribute goes to the root element.
Slots:
<:inner_block>(required)