Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Sparkles

    Small four point stars and dots that glint in and out across an area, around a heading, or burst from the center on hover.

    Setup complete

    Your workspace is ready

    We imported 3 repositories and 12 teammates. Time to ship something.

    Setup complete

    Your workspace is ready

    We imported 3 repositories and 12 teammates. Time to ship something.

    Setup complete

    Your workspace is ready

    We imported 3 repositories and 12 teammates. Time to ship something.

    Setup complete

    Your workspace is ready

    We imported 3 repositories and 12 teammates. Time to ship something.

    Setup complete

    Your workspace is ready

    We imported 3 repositories and 12 teammates. Time to ship something.

    <x-markas.sparkles :density="36" class="rounded-xl border border-line bg-surface px-6 py-12">
        <div class="grid justify-items-center gap-4 text-center">
            <p class="text-sm font-medium text-muted">Setup complete</p>
            <h2 class="text-2xl font-semibold text-balance text-ink">Your workspace is ready</h2>
            <p class="max-w-80 text-sm text-muted">We imported 3 repositories and 12 teammates. Time to ship something.</p>
            <x-markas.button>Open dashboard</x-markas.button>
        </div>
    </x-markas.sparkles>
    import { Button } from "@/components/markas/Button";
    import { Sparkles } from "@/components/markas/Sparkles";
    
    export default function SparklesExample() {
      return (
        <Sparkles
          density={36}
          className="rounded-xl border border-line bg-surface px-6 py-12"
        >
          <div className="grid justify-items-center gap-4 text-center">
            <p className="text-sm font-medium text-muted">Setup complete</p>
            <h2 className="text-2xl font-semibold text-balance text-ink">
              Your workspace is ready
            </h2>
            <p className="max-w-80 text-sm text-muted">
              We imported 3 repositories and 12 teammates. Time to ship something.
            </p>
            <Button>Open dashboard</Button>
          </div>
        </Sparkles>
      );
    }
    <script setup lang="ts">
    import Button from "@/components/markas/Button.vue";
    import Sparkles from "@/components/markas/Sparkles.vue";
    </script>
    
    <template>
      <Sparkles
        :density="36"
        class="rounded-xl border border-line bg-surface px-6 py-12"
      >
        <div class="grid justify-items-center gap-4 text-center">
          <p class="text-sm font-medium text-muted">Setup complete</p>
          <h2 class="text-2xl font-semibold text-balance text-ink">
            Your workspace is ready
          </h2>
          <p class="max-w-80 text-sm text-muted">
            We imported 3 repositories and 12 teammates. Time to ship something.
          </p>
          <Button>Open dashboard</Button>
        </div>
      </Sparkles>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Sparkles from "$lib/components/markas/Sparkles.svelte";
    </script>
    
    <Sparkles
      density={36}
      class="rounded-xl border border-line bg-surface px-6 py-12"
    >
      <div class="grid justify-items-center gap-4 text-center">
        <p class="text-sm font-medium text-muted">Setup complete</p>
        <h2 class="text-2xl font-semibold text-balance text-ink">
          Your workspace is ready
        </h2>
        <p class="max-w-80 text-sm text-muted">
          We imported 3 repositories and 12 teammates. Time to ship something.
        </p>
        <Button>Open dashboard</Button>
      </div>
    </Sparkles>
    ---
    import Button from "@/components/markas/Button.astro";
    import Sparkles from "@/components/markas/Sparkles.astro";
    ---
    
    <Sparkles
      density={36}
      class="rounded-xl border border-line bg-surface px-6 py-12"
    >
      <div class="grid justify-items-center gap-4 text-center">
        <p class="text-sm font-medium text-muted">Setup complete</p>
        <h2 class="text-2xl font-semibold text-balance text-ink">
          Your workspace is ready
        </h2>
        <p class="max-w-80 text-sm text-muted">
          We imported 3 repositories and 12 teammates. Time to ship something.
        </p>
        <Button>Open dashboard</Button>
      </div>
    </Sparkles>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { Sparkles } from "./markas/sparkles.component";
    
    @Component({
      selector: "markas-example",
      imports: [Button, Sparkles],
      template: `
        <div
          markas-sparkles
          density="36"
          class="rounded-xl border border-line bg-surface px-6 py-12"
        >
          <div class="grid justify-items-center gap-4 text-center">
            <p class="text-sm font-medium text-muted">Setup complete</p>
            <h2 class="text-2xl font-semibold text-balance text-ink">
              Your workspace is ready
            </h2>
            <p class="max-w-80 text-sm text-muted">
              We imported 3 repositories and 12 teammates. Time to ship something.
            </p>
            <button markas-button>Open dashboard</button>
          </div>
        </div>
      `,
    })
    export default class SparklesExample {}

    Examples

    Sparkling heading

    Meet MarkasUI Pro

    Every component, every template, and early access to what we build next.

    Meet MarkasUI Pro

    Every component, every template, and early access to what we build next.

    Meet MarkasUI Pro

    Every component, every template, and early access to what we build next.

    Meet MarkasUI Pro

    Every component, every template, and early access to what we build next.

    Meet MarkasUI Pro

    Every component, every template, and early access to what we build next.

    Upgrade card that bursts on hover

    You have used 9 of 10 free projects

    Upgrade for unlimited projects, custom domains, and team roles.

    You have used 9 of 10 free projects

    Upgrade for unlimited projects, custom domains, and team roles.

    You have used 9 of 10 free projects

    Upgrade for unlimited projects, custom domains, and team roles.

    You have used 9 of 10 free projects

    Upgrade for unlimited projects, custom domains, and team roles.

    You have used 9 of 10 free projects

    Upgrade for unlimited projects, custom domains, and team roles.

    Empty state

    Inbox zero

    Every review is done. New requests will show up here.

    Inbox zero

    Every review is done. New requests will show up here.

    Inbox zero

    Every review is done. New requests will show up here.

    Inbox zero

    Every review is done. New requests will show up here.

    Inbox zero

    Every review is done. New requests will show up here.

    Installation

    npx markasui@latest add sparkles

    Usage

    <x-markas.sparkles variant="field" :density="36" color="warning" class="rounded-xl border border-line bg-surface px-6 py-12">
        <h2 class="text-2xl font-semibold text-ink">Your workspace is ready</h2>
        <x-markas.button>Open dashboard</x-markas.button>
    </x-markas.sparkles>
    
    <x-markas.sparkles variant="text" size="sm" class="px-6 py-4">
        <h2 class="text-3xl font-semibold text-ink">Meet Markas Pro</h2>
    </x-markas.sparkles>

    No JavaScript or Alpine.js needed.

    import { Button } from "@/components/markas/Button";
    import { Sparkles } from "@/components/markas/Sparkles";
    
    <Sparkles
      variant="burst"
      density={32}
      size="lg"
      className="rounded-xl border border-line bg-surface px-6 py-10"
    >
      <h2 className="text-xl font-semibold text-ink">Unlock every template</h2>
      <Button>Upgrade now</Button>
    </Sparkles>;
    <template>
      <Sparkles
        variant="burst"
        :density="32"
        size="lg"
        class="rounded-xl border border-line bg-surface px-6 py-10"
      >
        <h2 class="text-xl font-semibold text-ink">Unlock every template</h2>
        <Button>Upgrade now</Button>
      </Sparkles>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Sparkles from "$lib/components/markas/Sparkles.svelte";
    </script>
    
    <Sparkles
      variant="burst"
      density={32}
      size="lg"
      class="rounded-xl border border-line bg-surface px-6 py-10"
    >
      <h2 class="text-xl font-semibold text-ink">Unlock every template</h2>
      <Button>Upgrade now</Button>
    </Sparkles>
    ---
    import Button from "@/components/markas/Button.astro";
    import Sparkles from "@/components/markas/Sparkles.astro";
    ---
    
    <Sparkles
      variant="burst"
      density={32}
      size="lg"
      class="rounded-xl border border-line bg-surface px-6 py-10"
    >
      <h2 class="text-xl font-semibold text-ink">Unlock every template</h2>
      <Button>Upgrade now</Button>
    </Sparkles>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { Sparkles } from "./markas/sparkles.component";
    
    @Component({
      selector: "app-upgrade",
      imports: [Button, Sparkles],
      template: `
        <div
          markas-sparkles
          variant="burst"
          density="32"
          size="lg"
          class="rounded-xl border border-line bg-surface px-6 py-10"
        >
          <h2 class="text-xl font-semibold text-ink">Unlock every template</h2>
          <button markas-button>Upgrade now</button>
        </div>
      `,
    })
    export class Upgrade {}

    Angular uses an attribute selector on the native div, so class, aria-*, and other attributes stay on the root element.

    • Positions, sizes, and timing come from seed with integer math, so all six frameworks render the same sparkles.
    • burst uses a CSS hover and focus-within group on the component, so it needs no JavaScript and also plays for keyboard users.
    • With reduced motion, field and text sparkles stay still and burst sparkles stay hidden.
    • The component has no built-in text, so there are no label props to translate.

    Props

    NameTypeDefaultDescription
    variantfield | text | burstfieldfield: stars and dots across the whole area. text: stars along the edges around a heading. burst: stars fly out from the center on hover or focus.
    densitynumber24Number of sparkles, up to 120.
    sizesm | md | lgmdSparkle size range: 4 to 7px, 6 to 11px, or 10 to 17px.
    colormuted | ink | primary | success | warning | dangerwarningToken color of the sparkles.
    seednumber5Whole number that decides positions, sizes, and timing. The same seed always gives the same sparkles.
    children / slotslot / ReactNode-Content shown on top of the sparkles.

    Accessibility

    • The sparkle layer is aria-hidden and ignores pointer events.
    • With reduced motion, field and text sparkles stay still and burst sparkles stay hidden.
    • Burst also plays when a control inside receives keyboard focus, not only on hover.

    Related components

    More backgrounds components with the same classes in every framework.