Tekstur grain, film, atau kertas statis di atas gradien token yang bergeser pelan. Murni CSS dengan satu tile noise SVG inline.
Design tools with a little texture
Brushes, grain, and paper that make digital work feel made by hand.
Design tools with a little texture
Brushes, grain, and paper that make digital work feel made by hand.
Design tools with a little texture
Brushes, grain, and paper that make digital work feel made by hand.
Design tools with a little texture
Brushes, grain, and paper that make digital work feel made by hand.
Design tools with a little texture
Brushes, grain, and paper that make digital work feel made by hand.
<x-markas.noise-background color="warning" class="rounded-xl border border-line bg-surface px-6 py-14">
<div class="grid gap-4">
<h2 class="text-3xl font-semibold tracking-tight text-balance text-ink">Design tools with a little texture</h2>
<p class="max-w-80 text-sm text-muted">Brushes, grain, and paper that make digital work feel made by hand.</p>
<div class="flex gap-2">
<x-markas.button>Download the kit</x-markas.button>
<x-markas.button variant="ghost">Browse samples</x-markas.button>
</div>
</div>
</x-markas.noise-background>Contoh
Pemutaran film
Premieres Friday
The Last Release
A documentary about the team that shipped on time, every time.
Premieres Friday
The Last Release
A documentary about the team that shipped on time, every time.
Premieres Friday
The Last Release
A documentary about the team that shipped on time, every time.
Premieres Friday
The Last Release
A documentary about the team that shipped on time, every time.
Premieres Friday
The Last Release
A documentary about the team that shipped on time, every time.
<x-markas.noise-background variant="film" color="danger" intensity="high" class="dark rounded-xl bg-canvas px-6 py-14 text-ink">
<div class="grid justify-items-center gap-3 text-center">
<p class="text-sm font-medium text-danger">Premieres Friday</p>
<h3 class="text-3xl font-semibold tracking-tight text-ink">The Last Release</h3>
<p class="max-w-72 text-sm text-muted">A documentary about the team that shipped on time, every time.</p>
<x-markas.button>Watch the trailer</x-markas.button>
</div>
</x-markas.noise-background>Daftar newsletter
<x-markas.noise-background variant="paper" color="muted" size="coarse" speed="slow" class="rounded-xl border border-line bg-canvas px-6 py-10">
<form class="grid gap-4">
<div class="grid gap-1">
<h3 class="text-xl font-semibold text-ink">The Sunday Letter</h3>
<p class="text-sm text-muted">One long read, three links, and no noise. Every Sunday morning.</p>
</div>
<x-markas.input label="Email" type="email" placeholder="you@example.com" />
<x-markas.button type="submit">Subscribe</x-markas.button>
</form>
</x-markas.noise-background>Bilah statistik
- Teams
- 12k
- Uptime
- 99.98%
- Rating
- 4.9
- Teams
- 12k
- Uptime
- 99.98%
- Rating
- 4.9
- Teams
- 12k
- Uptime
- 99.98%
- Rating
- 4.9
- Teams
- 12k
- Uptime
- 99.98%
- Rating
- 4.9
- Teams
- 12k
- Uptime
- 99.98%
- Rating
- 4.9
<x-markas.noise-background color="success" intensity="low" size="fine" class="rounded-xl border border-line bg-surface p-6">
<dl class="grid grid-cols-3 gap-4 text-center">
@foreach ([['12k', 'Teams'], ['99.98%', 'Uptime'], ['4.9', 'Rating']] as [$value, $label])
<div class="grid gap-1">
<dt class="text-sm text-muted">{{ $label }}</dt>
<dd class="text-2xl font-semibold tracking-tight text-ink">{{ $value }}</dd>
</div>
@endforeach
</dl>
</x-markas.noise-background>Instalasi
npx markasui@latest add noise-backgroundpnpm dlx markasui@latest add noise-backgroundyarn dlx markasui@latest add noise-backgroundbunx --bun markasui@latest add noise-background- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
resources/views/components/markas/noise-background.blade.php.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/NoiseBackground.tsx.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/NoiseBackground.vue.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/lib/components/markas/NoiseBackground.svelte.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/NoiseBackground.astro.
- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/app/markas/noise-background.component.ts.
Pemakaian
<x-markas.noise-background color="warning" class="rounded-xl border border-line bg-surface px-6 py-14">
<h2 class="text-3xl font-semibold text-ink">Alat desain dengan sedikit tekstur</h2>
<x-markas.button>Unduh kit</x-markas.button>
</x-markas.noise-background>Tidak butuh JavaScript atau Alpine.js.
import { Button } from "@/components/markas/Button";
import { NoiseBackground } from "@/components/markas/NoiseBackground";
<NoiseBackground
color="warning"
className="rounded-xl border border-line bg-surface px-6 py-14"
>
<h2 className="text-3xl font-semibold text-ink">
Alat desain dengan sedikit tekstur
</h2>
<Button>Unduh kit</Button>
</NoiseBackground>;<template>
<NoiseBackground
color="warning"
class="rounded-xl border border-line bg-surface px-6 py-14"
>
<h2 class="text-3xl font-semibold text-ink">
Alat desain dengan sedikit tekstur
</h2>
<Button>Unduh kit</Button>
</NoiseBackground>
</template><script lang="ts">
import Button from "$lib/components/markas/Button.svelte";
import NoiseBackground from "$lib/components/markas/NoiseBackground.svelte";
</script>
<NoiseBackground
color="warning"
class="rounded-xl border border-line bg-surface px-6 py-14"
>
<h2 class="text-3xl font-semibold text-ink">
Design tools with a little texture
</h2>
<Button>Download the kit</Button>
</NoiseBackground>---
import Button from "@/components/markas/Button.astro";
import NoiseBackground from "@/components/markas/NoiseBackground.astro";
---
<NoiseBackground
color="warning"
class="rounded-xl border border-line bg-surface px-6 py-14"
>
<h2 class="text-3xl font-semibold text-ink">
Design tools with a little texture
</h2>
<Button>Download the kit</Button>
</NoiseBackground>import { Component } from "@angular/core";
import { Button } from "./markas/button.component";
import { NoiseBackground } from "./markas/noise-background.component";
@Component({
selector: "app-kit",
imports: [Button, NoiseBackground],
template: `
<div
markas-noise-background
color="warning"
class="rounded-xl border border-line bg-surface px-6 py-14"
>
<h2 class="text-3xl font-semibold text-ink">
Design tools with a little texture
</h2>
<button markas-button>Download the kit</button>
</div>
`,
})
export class Kit {}Angular memakai attribute selector pada div native, jadi class, aria-*, dan atribut lain tetap di elemen akar.
- Tekstur berupa satu tile SVG
feTurbulenceyang disisipkan sebagai data URL dan dipakai sebagai mask CSS di atas tokenink, jadi ikut mode terang dan gelap. Browser merendernya sekali lalu mengulangnya. - Hanya gradien di bawah tekstur yang bergerak, lewat transform pelan. Butirannya statis, jadi tidak ada kerja per frame.
variant="film"menambah vignette yang menggelapkan tepi di kedua tema.- Komponen ini tidak punya teks bawaan, jadi tidak ada prop label yang perlu diterjemahkan.
Props
| Nama | Tipe | Default | Keterangan |
|---|---|---|---|
variant | grain | film | paper | grain | grain: butiran halus. film: butiran dengan vignette gelap di tepi. paper: serat kertas bergaris yang lembut. |
color | primary | success | warning | danger | muted | primary | Token untuk gradien di bawah tekstur. |
intensity | low | medium | high | medium | Seberapa terlihat teksturnya. |
size | fine | medium | coarse | medium | Ukuran satu tile noise: 120px, 200px, atau 320px. Tile lebih besar memberi butiran lebih kasar. |
speed | slow | normal | fast | normal | Kecepatan gradien bergeser: 30s, 18s, atau 10s per siklus. Teksturnya sendiri tidak bergerak. |
children / slot | slot / ReactNode | - | Konten yang tampil di atas tekstur. |
Aksesibilitas
- Lapisan tekstur memakai aria-hidden dan mengabaikan pointer.
- Butiran memakai token ink dengan opacity rendah, jadi teks ink dan muted tetap kontras.
- Dengan reduced motion, gradien berhenti bergeser.
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.