Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Sparkles

    Bintang empat sisi dan titik kecil yang berkilau muncul dan memudar di sebuah area, di sekitar judul, atau memancar dari tengah saat 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 {}

    Contoh

    Judul berkilau

    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.

    Kartu upgrade yang memancar saat 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.

    Instalasi

    npx markasui@latest add sparkles

    Pemakaian

    <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">Workspace kamu sudah siap</h2>
        <x-markas.button>Buka dasbor</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">Kenalan dengan Markas Pro</h2>
    </x-markas.sparkles>

    Tidak butuh JavaScript atau Alpine.js.

    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">Buka semua template</h2>
      <Button>Upgrade sekarang</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">Buka semua template</h2>
        <Button>Upgrade sekarang</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 memakai attribute selector pada div native, jadi class, aria-*, dan atribut lain tetap di elemen akar.

    • Posisi, ukuran, dan waktu dihitung dari seed dengan bilangan bulat, jadi semua framework merender kilau yang sama.
    • burst memakai grup hover dan focus-within CSS pada komponen, jadi tanpa JavaScript dan juga berjalan untuk pengguna keyboard.
    • Dengan reduced motion, kilau field dan text diam, dan kilau burst tetap tersembunyi.
    • Komponen ini tidak punya teks bawaan, jadi tidak ada prop label yang perlu diterjemahkan.

    Props

    NamaTipeDefaultKeterangan
    variantfield | text | burstfieldfield: bintang dan titik di seluruh area. text: bintang di sepanjang tepi sekitar judul. burst: bintang memancar dari tengah saat hover atau fokus.
    densitynumber24Jumlah kilau, maksimal 120.
    sizesm | md | lgmdRentang ukuran kilau: 4 sampai 7px, 6 sampai 11px, atau 10 sampai 17px.
    colormuted | ink | primary | success | warning | dangerwarningWarna token kilau.
    seednumber5Bilangan bulat yang menentukan posisi, ukuran, dan waktu. Seed sama selalu menghasilkan kilau yang sama.
    children / slotslot / ReactNode-Konten yang tampil di atas kilau.

    Aksesibilitas

    • Lapisan kilau memakai aria-hidden dan mengabaikan pointer.
    • Dengan reduced motion, kilau field dan text diam, dan kilau burst tetap tersembunyi.
    • Burst juga berjalan saat kontrol di dalamnya mendapat fokus keyboard, bukan hanya saat hover.

    Komponen terkait

    Komponen latar lain dengan class yang sama di setiap framework.