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>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.
<div class="grid justify-items-center gap-4 rounded-xl border border-line bg-surface px-6 py-10 text-center">
<x-markas.sparkles variant="text" :density="18" size="sm" class="px-6 py-4">
<h3 class="text-3xl font-semibold tracking-tight text-ink">Meet MarkasUI Pro</h3>
</x-markas.sparkles>
<p class="max-w-72 text-sm text-muted">Every component, every template, and early access to what we build next.</p>
<x-markas.button>See what is new</x-markas.button>
</div>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.
<x-markas.sparkles variant="burst" :density="32" size="lg" class="rounded-xl border border-line bg-surface px-6 py-10">
<div class="grid justify-items-center gap-4 text-center">
<h3 class="text-xl font-semibold text-ink">You have used 9 of 10 free projects</h3>
<p class="max-w-72 text-sm text-muted">Upgrade for unlimited projects, custom domains, and team roles.</p>
<x-markas.button>Upgrade now</x-markas.button>
</div>
</x-markas.sparkles>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.
<x-markas.sparkles color="success" size="sm" :density="20" :seed="9" class="rounded-xl border border-dashed border-line bg-surface px-6 py-10">
<div class="grid justify-items-center gap-3 text-center">
<h3 class="text-base font-semibold text-ink">Inbox zero</h3>
<p class="max-w-64 text-sm text-muted">Every review is done. New requests will show up here.</p>
<x-markas.button variant="secondary" size="sm">View archive</x-markas.button>
</div>
</x-markas.sparkles>Instalasi
npx markasui@latest add sparklespnpm dlx markasui@latest add sparklesyarn dlx markasui@latest add sparklesbunx --bun markasui@latest add sparkles- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
resources/views/components/markas/sparkles.blade.php.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/Sparkles.tsx.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/Sparkles.vue.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/lib/components/markas/Sparkles.svelte.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/Sparkles.astro.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/app/markas/sparkles.component.ts.
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
seeddengan bilangan bulat, jadi semua framework merender kilau yang sama. burstmemakai 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
| Nama | Tipe | Default | Keterangan |
|---|---|---|---|
variant | field | text | burst | field | field: bintang dan titik di seluruh area. text: bintang di sepanjang tepi sekitar judul. burst: bintang memancar dari tengah saat hover atau fokus. |
density | number | 24 | Jumlah kilau, maksimal 120. |
size | sm | md | lg | md | Rentang ukuran kilau: 4 sampai 7px, 6 sampai 11px, atau 10 sampai 17px. |
color | muted | ink | primary | success | warning | danger | warning | Warna token kilau. |
seed | number | 5 | Bilangan bulat yang menentukan posisi, ukuran, dan waktu. Seed sama selalu menghasilkan kilau yang sama. |
children / slot | slot / 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.
- Aurora BackgroundBidang warna bercahaya yang bergeser pelan di belakang konten, dari token primary dan satu token aksen.
- Background BeamsBerkas cahaya tipis melengkung yang mengalir, berdenyut, atau jatuh dan memercik di belakang konten. Murni SVG dan CSS, tanpa JavaScript.
- Background BoxesGrid kotak miring, datar, atau berperspektif yang menyala di bawah kursor lalu memudar, hanya dengan CSS hover.
- Background LinesGaris SVG yang tergambar lalu menghilang bergantian, berupa gelombang, sinar dari satu titik, atau kisi. Dibuat untuk hero.
- Dot PatternGrid titik kecil di belakang konten, dengan pudar radial atau linear opsional. Murni CSS, tanpa JavaScript.
- Gradient BorderMembungkus kartu, tombol, atau kolom dengan border gradien bergerak yang berputar, berkilau, atau berdenyut, dengan pendar lembut opsional.