Garis SVG yang tergambar lalu menghilang bergantian, berupa gelombang, sinar dari satu titik, atau kisi. Dibuat untuk hero.
Ideas in motion
Sketch, review, and ship product updates in one calm workspace.
Ideas in motion
Sketch, review, and ship product updates in one calm workspace.
Ideas in motion
Sketch, review, and ship product updates in one calm workspace.
Ideas in motion
Sketch, review, and ship product updates in one calm workspace.
Ideas in motion
Sketch, review, and ship product updates in one calm workspace.
<x-markas.background-lines class="rounded-xl border border-line bg-surface px-6 py-16">
<div class="grid justify-items-center gap-4 text-center">
<h2 class="text-4xl font-bold tracking-tight text-ink">
Ideas in motion
</h2>
<p class="max-w-72 text-sm text-muted">
Sketch, review, and ship product updates in one calm workspace.
</p>
<x-markas.button>Start sketching</x-markas.button>
</div>
</x-markas.background-lines>Contoh
Halaman 404 dengan sinar
404
Nothing under this spotlight
The page you are looking for was moved or never existed.
404
Nothing under this spotlight
The page you are looking for was moved or never existed.
404
Nothing under this spotlight
The page you are looking for was moved or never existed.
404
Nothing under this spotlight
The page you are looking for was moved or never existed.
404
Nothing under this spotlight
The page you are looking for was moved or never existed.
Masuk dengan kisi
Kartu CTA uji coba
Your first month is on us
Invite the whole team and keep every project in sync from day one.
Your first month is on us
Invite the whole team and keep every project in sync from day one.
Your first month is on us
Invite the whole team and keep every project in sync from day one.
Your first month is on us
Invite the whole team and keep every project in sync from day one.
Your first month is on us
Invite the whole team and keep every project in sync from day one.
Instalasi
npx markasui@latest add background-linespnpm dlx markasui@latest add background-linesyarn dlx markasui@latest add background-linesbunx --bun markasui@latest add background-lines- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
resources/views/components/markas/background-lines.blade.php.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/BackgroundLines.tsx.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/BackgroundLines.vue.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/lib/components/markas/BackgroundLines.svelte.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/BackgroundLines.astro.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/app/markas/background-lines.component.ts.
Pemakaian
<x-markas.background-lines variant="waves" :count="12" class="rounded-xl bg-surface px-6 py-16">
<h2 class="text-center text-3xl font-bold text-ink">Ide yang bergerak</h2>
</x-markas.background-lines>Tidak butuh JavaScript atau Alpine.js.
import { BackgroundLines } from "@/components/markas/BackgroundLines";
<BackgroundLines
variant="waves"
count={12}
className="rounded-xl bg-surface px-6 py-16"
>
<h2 className="text-center text-3xl font-bold text-ink">Ide yang bergerak</h2>
</BackgroundLines>;<template>
<BackgroundLines
variant="waves"
:count="12"
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Ide yang bergerak</h2>
</BackgroundLines>
</template><script lang="ts">
import BackgroundLines from "$lib/components/markas/BackgroundLines.svelte";
</script>
<BackgroundLines
variant="waves"
count={12}
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Ide yang bergerak</h2>
</BackgroundLines>---
import BackgroundLines from "@/components/markas/BackgroundLines.astro";
---
<BackgroundLines
variant="waves"
count={12}
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Ide yang bergerak</h2>
</BackgroundLines>Tanpa JavaScript di browser; markup dirender di server.
import { Component } from "@angular/core";
import { BackgroundLines } from "./markas/background-lines.component";
@Component({
selector: "app-hero",
imports: [BackgroundLines],
template: `
<div
markas-background-lines
variant="waves"
[count]="12"
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Ide yang bergerak</h2>
</div>
`,
})
export class Hero {}Komponen ini berupa atribut pada div, jadi class, style, dan atribut lain tetap di elemen akar.
- Setiap garis tergambar, bertahan, lalu memudar, bergeser dari garis tetangganya supaya gambar tidak pernah kosong.
raysmemancar dari tengah atas: beri padding atas supaya sumber cahaya berada di atas judul.- Garis mengikuti ukuran area (gambar 800x400 menutupinya seperti
object-fit: cover). - Komponen ini tidak punya teks bawaan, jadi tidak ada prop label yang perlu diterjemahkan.
Props
| Nama | Tipe | Default | Keterangan |
|---|---|---|---|
variant | waves | rays | lattice | waves | waves menumpuk kurva lembut, rays memancarkan garis dari tengah atas, lattice menyilangkan garis diagonal. |
count | number | 12 | Jumlah garis, maksimal 24. |
speed | slow | normal | fast | normal | Panjang satu siklus gambar dan pudar: 12s, 8s, atau 5s. |
color | muted | primary | success | warning | danger | primary | Warna token garis. |
children / slot | slot / ReactNode / snippet | - | Konten yang tampil di atas garis. |
Aksesibilitas
- Lapisan garis memakai aria-hidden dan mengabaikan pointer.
- Dengan reduced motion, semua garis tampil utuh dan diam.
- Posisi garis berasal dari rumus, jadi server dan klien merender markup yang sama.
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.
- 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.
- Grid PatternGaris grid tipis di belakang konten, dengan sel sorotan yang berdenyut lembut dan pudar opsional.