Aura | jaspr_daisyui_components
jaspr_daisyui_components
pub.dev ↗

Aura

Aura is a border light effect that can wrap around any component. It is a great way to add a cool, eye-catching visual effect to your components. Aura is useful for the most important button, card, or div that you want to highlight.

Class name Type Description
aura Component Container element to add a light effect aura around an element. By default it's a rotating border
aura-dual Style Uses two light effects
aura-rainbow Style Uses rainbow colors for the light effect
aura-holo Style Uses holographic colors for the light effect
aura-gold Style Uses gold colors for the light effect
aura-silver Style Uses silver colors for the light effect
aura-glow Style Uses a glowing effect for the light instead of a rotating border
aura-xs Size Extra small size
aura-sm Size Small size
aura-md Size Medium size (default)
aura-lg Size Large size
aura-xl Size Extra large size

Aura

Aura around a card

This card has aura

<div class="aura">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>This card has aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('This card has aura')])])], classes: 'bg-base-100'),
  ],
);

Aura around a button

<div class="aura">
  <button class="btn">button with aura</button>
</div>
Aura([Btn([Component.text('button with aura')])]);

Aura dual

This card has dual aura

<div class="aura aura-dual">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>This card has dual aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('This card has dual aura')])])], classes: 'bg-base-100'),
  ],
  style: [AuraStyle.dual],
);

Aura rainbow

This card has rainbow aura

<div class="aura aura-rainbow">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>This card has rainbow aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('This card has rainbow aura')])])], classes: 'bg-base-100'),
  ],
  style: [AuraStyle.rainbow],
);

Aura holo

This card has holo aura

<div class="aura aura-holo">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>This card has holo aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('This card has holo aura')])])], classes: 'bg-base-100'),
  ],
  style: [AuraStyle.holo],
);

Aura glow

This card has glow aura

<div class="aura aura-glow">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>This card has glow aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('This card has glow aura')])])], classes: 'bg-base-100'),
  ],
  style: [AuraStyle.glow],
);

Aura gold

This card has gold aura

<div class="aura aura-gold">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>This card has gold aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('This card has gold aura')])])], classes: 'bg-base-100'),
  ],
  style: [AuraStyle.gold],
);

Aura silver

This card has silver aura

<div class="aura aura-silver">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>This card has silver aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('This card has silver aura')])])], classes: 'bg-base-100'),
  ],
  style: [AuraStyle.silver],
);

Aura with custom color

This card has custom color aura

<div class="aura text-orange-600">
  <div class="card bg-base-100 text-base-content">
    <div class="card-body">
      <p>This card has custom color aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card(
      [CardBody([p([Component.text('This card has custom color aura')])])],
      classes: 'bg-base-100 text-base-content',
    ),
  ],
  classes: 'text-orange-600',
);

Aura with custom color and custom background color

This card has custom color and background aura

<div class="aura text-orange-600 bg-yellow-200">
  <div class="card bg-base-100 text-base-content">
    <div class="card-body">
      <p>This card has custom color and background aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card(
      [
        CardBody([p([Component.text('This card has custom color and background aura')])]),
      ],
      classes: 'bg-base-100 text-base-content',
    ),
  ],
  classes: 'text-orange-600 bg-yellow-200',
);

Aura rainbow around a pricing card

Most Popular

Premium

$29/mo
  • High-resolution image generation
  • Customizable style templates
  • Batch processing capabilities
  • AI-driven image enhancements
  • Seamless cloud integration
  • Real-time collaboration tools
<div class="aura aura-rainbow">
  <div class="card w-96 bg-base-100 shadow-sm">
    <div class="card-body">
      <span class="badge badge-xs badge-warning">Most Popular</span>
      <div class="flex justify-between">
        <h2 class="text-3xl font-bold">Premium</h2>
        <span class="text-xl">$29/mo</span>
      </div>
      <ul class="mt-6 flex flex-col gap-2 text-xs">
        <li>
          <svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
          </svg>
          <span>High-resolution image generation</span>
        </li>
        <li>
          <svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
          </svg>
          <span>Customizable style templates</span>
        </li>
        <li>
          <svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
          </svg>
          <span>Batch processing capabilities</span>
        </li>
        <li>
          <svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
          </svg>
          <span>AI-driven image enhancements</span>
        </li>
        <li class="opacity-50">
          <svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-base-content/50" fill="none" viewbox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
          </svg>
          <span class="line-through">Seamless cloud integration</span>
        </li>
        <li class="opacity-50">
          <svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-base-content/50" fill="none" viewbox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
          </svg>
          <span class="line-through">Real-time collaboration tools</span>
        </li>
      </ul>
      <div class="mt-6">
        <button class="btn btn-primary btn-block">Subscribe</button>
      </div>
    </div>
  </div>
</div>
Aura(
  [
    Card(
      [
        CardBody(
          [
            span([Component.text('Most Popular')], classes: 'badge badge-xs badge-warning'),
            div(
              [
                h2([Component.text('Premium')], classes: 'text-3xl font-bold'),
                span([Component.text('\$29/mo')], classes: 'text-xl'),
              ],
              classes: 'flex justify-between',
            ),
            ul(
              [
                li(
                  [
                    RawText(r'''<svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>'''),
                    span([Component.text('High-resolution image generation')]),
                  ],
                ),
                li(
                  [
                    RawText(r'''<svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>'''),
                    span([Component.text('Customizable style templates')]),
                  ],
                ),
                li(
                  [
                    RawText(r'''<svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>'''),
                    span([Component.text('Batch processing capabilities')]),
                  ],
                ),
                li(
                  [
                    RawText(r'''<svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-success" fill="none" viewbox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>'''),
                    span([Component.text('AI-driven image enhancements')]),
                  ],
                ),
                li(
                  [
                    RawText(r'''<svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-base-content/50" fill="none" viewbox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>'''),
                    span([Component.text('Seamless cloud integration')], classes: 'line-through'),
                  ],
                  classes: 'opacity-50',
                ),
                li(
                  [
                    RawText(r'''<svg xmlns="http://www.w3.org/2000/svg" class="size-4 me-2 inline-block text-base-content/50" fill="none" viewbox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>'''),
                    span([Component.text('Real-time collaboration tools')], classes: 'line-through'),
                  ],
                  classes: 'opacity-50',
                ),
              ],
              classes: 'mt-6 flex flex-col gap-2 text-xs',
            ),
            div(
              [
                Btn(
                  [Component.text('Subscribe')],
                  color: BtnColor.primary,
                  modifier: BtnModifier.block,
                ),
              ],
              classes: 'mt-6',
            ),
          ],
        ),
      ],
      classes: 'w-96 bg-base-100 shadow-sm',
    ),
  ],
  style: [AuraStyle.rainbow],
);

Aura sizes

<div class="aura aura-xs">
  <button class="btn">XS</button>
</div>
<div class="aura aura-sm">
  <button class="btn">SM</button>
</div>
<div class="aura">
  <button class="btn">MD</button>
</div>
<div class="aura aura-lg">
  <button class="btn">LG</button>
</div>
<div class="aura aura-xl">
  <button class="btn">XL</button>
</div>
Component.fragment([
  Aura([Btn([Component.text('XS')])], size: AuraSize.xs),
  Aura([Btn([Component.text('SM')])], size: AuraSize.sm),
  Aura([Btn([Component.text('MD')])]),
  Aura([Btn([Component.text('LG')])], size: AuraSize.lg),
  Aura([Btn([Component.text('XL')])], size: AuraSize.xl),
]);

Aura with custom animation duration

2000ms duration aura

<div class="aura aura-rainbow duration-2000">
  <div class="card bg-base-100">
    <div class="card-body">
      <p>2000ms duration aura</p>
    </div>
  </div>
</div>
Aura(
  [
    Card([CardBody([p([Component.text('2000ms duration aura')])])], classes: 'bg-base-100'),
  ],
  classes: 'duration-2000',
  style: [AuraStyle.rainbow],
);