Background Boxes
Grid kotak miring, datar, atau berperspektif yang menyala di bawah kursor lalu memudar, hanya dengan CSS hover.
Design in blocks
Move your cursor across the grid and watch each tile light up.
Design in blocks
Move your cursor across the grid and watch each tile light up.
Design in blocks
Move your cursor across the grid and watch each tile light up.
Design in blocks
Move your cursor across the grid and watch each tile light up.
Design in blocks
Move your cursor across the grid and watch each tile light up.
<x-markas.background-boxes 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">
Design in blocks
</h2>
<p class="max-w-72 rounded-md bg-surface/80 text-sm text-muted">
Move your cursor across the grid and watch each tile light up.
</p>
<x-markas.button>Explore blocks</x-markas.button>
</div>
</x-markas.background-boxes>import { BackgroundBoxes } from "@/components/markas/BackgroundBoxes";
import { Button } from "@/components/markas/Button";
export default function BackgroundBoxesExample() {
return (
<BackgroundBoxes className="rounded-xl border border-line bg-surface px-6 py-16">
<div className="grid justify-items-center gap-4 text-center">
<h2 className="text-4xl font-bold tracking-tight text-ink">
Design in blocks
</h2>
<p className="max-w-72 rounded-md bg-surface/80 text-sm text-muted">
Move your cursor across the grid and watch each tile light up.
</p>
<Button>Explore blocks</Button>
</div>
</BackgroundBoxes>
);
}<script setup lang="ts">
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.vue";
import Button from "@/components/markas/Button.vue";
</script>
<template>
<BackgroundBoxes 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">
Design in blocks
</h2>
<p class="max-w-72 rounded-md bg-surface/80 text-sm text-muted">
Move your cursor across the grid and watch each tile light up.
</p>
<Button>Explore blocks</Button>
</div>
</BackgroundBoxes>
</template><script lang="ts">
import BackgroundBoxes from "$lib/components/markas/BackgroundBoxes.svelte";
import Button from "$lib/components/markas/Button.svelte";
</script>
<BackgroundBoxes 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">Design in blocks</h2>
<p class="max-w-72 rounded-md bg-surface/80 text-sm text-muted">
Move your cursor across the grid and watch each tile light up.
</p>
<Button>Explore blocks</Button>
</div>
</BackgroundBoxes>---
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.astro";
import Button from "@/components/markas/Button.astro";
---
<BackgroundBoxes 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">
Design in blocks
</h2>
<p class="max-w-72 rounded-md bg-surface/80 text-sm text-muted">
Move your cursor across the grid and watch each tile light up.
</p>
<Button>Explore blocks</Button>
</div>
</BackgroundBoxes>import { Component } from "@angular/core";
import { BackgroundBoxes } from "./markas/background-boxes.component";
import { Button } from "./markas/button.component";
@Component({
selector: "markas-example",
imports: [BackgroundBoxes, Button],
template: `
<div
markas-background-boxes
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">
Design in blocks
</h2>
<p class="max-w-72 rounded-md bg-surface/80 text-sm text-muted">
Move your cursor across the grid and watch each tile light up.
</p>
<button markas-button>Explore blocks</button>
</div>
</div>
`,
})
export default class BackgroundBoxesFixture {}Contoh
Section fitur grid datar
Everything in its place
-
Boards
Plan work in columns.
-
Docs
Write specs next to tasks.
-
Goals
Track progress weekly.
-
Reports
Share wins with one link.
Everything in its place
Boards
Plan work in columns.
Docs
Write specs next to tasks.
Goals
Track progress weekly.
Reports
Share wins with one link.
Everything in its place
Boards
Plan work in columns.
Docs
Write specs next to tasks.
Goals
Track progress weekly.
Reports
Share wins with one link.
Everything in its place
Boards
Plan work in columns.
Docs
Write specs next to tasks.
Goals
Track progress weekly.
Reports
Share wins with one link.
Everything in its place
Boards
Plan work in columns.
Docs
Write specs next to tasks.
Goals
Track progress weekly.
Reports
Share wins with one link.
<x-markas.background-boxes
variant="flat"
color="success"
:rows="8"
:cols="14"
:size="36"
class="rounded-xl border border-line bg-canvas p-6"
>
<div class="grid gap-4">
<h3 class="text-2xl font-semibold text-ink">Everything in its place</h3>
<ul class="grid grid-cols-2 gap-3">
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Boards</p>
<p class="text-xs text-muted">Plan work in columns.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Docs</p>
<p class="text-xs text-muted">Write specs next to tasks.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Goals</p>
<p class="text-xs text-muted">Track progress weekly.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Reports</p>
<p class="text-xs text-muted">Share wins with one link.</p>
</li>
</ul>
</div>
</x-markas.background-boxes>import { BackgroundBoxes } from "@/components/markas/BackgroundBoxes";
export default function Example() {
return (
<BackgroundBoxes
variant="flat"
color="success"
rows={8}
cols={14}
size={36}
className="rounded-xl border border-line bg-canvas p-6"
>
<div className="grid gap-4">
<h3 className="text-2xl font-semibold text-ink">
Everything in its place
</h3>
<ul className="grid grid-cols-2 gap-3">
<li className="rounded-lg border border-line bg-surface p-3">
<p className="text-sm font-semibold text-ink">Boards</p>
<p className="text-xs text-muted">Plan work in columns.</p>
</li>
<li className="rounded-lg border border-line bg-surface p-3">
<p className="text-sm font-semibold text-ink">Docs</p>
<p className="text-xs text-muted">Write specs next to tasks.</p>
</li>
<li className="rounded-lg border border-line bg-surface p-3">
<p className="text-sm font-semibold text-ink">Goals</p>
<p className="text-xs text-muted">Track progress weekly.</p>
</li>
<li className="rounded-lg border border-line bg-surface p-3">
<p className="text-sm font-semibold text-ink">Reports</p>
<p className="text-xs text-muted">Share wins with one link.</p>
</li>
</ul>
</div>
</BackgroundBoxes>
);
}<script setup lang="ts">
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.vue";
</script>
<template>
<BackgroundBoxes
variant="flat"
color="success"
:rows="8"
:cols="14"
:size="36"
class="rounded-xl border border-line bg-canvas p-6"
>
<div class="grid gap-4">
<h3 class="text-2xl font-semibold text-ink">Everything in its place</h3>
<ul class="grid grid-cols-2 gap-3">
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Boards</p>
<p class="text-xs text-muted">Plan work in columns.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Docs</p>
<p class="text-xs text-muted">Write specs next to tasks.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Goals</p>
<p class="text-xs text-muted">Track progress weekly.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Reports</p>
<p class="text-xs text-muted">Share wins with one link.</p>
</li>
</ul>
</div>
</BackgroundBoxes>
</template><script lang="ts">
import BackgroundBoxes from "$lib/components/markas/BackgroundBoxes.svelte";
</script>
<BackgroundBoxes
variant="flat"
color="success"
rows={8}
cols={14}
size={36}
class="rounded-xl border border-line bg-canvas p-6"
>
<div class="grid gap-4">
<h3 class="text-2xl font-semibold text-ink">Everything in its place</h3>
<ul class="grid grid-cols-2 gap-3">
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Boards</p>
<p class="text-xs text-muted">Plan work in columns.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Docs</p>
<p class="text-xs text-muted">Write specs next to tasks.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Goals</p>
<p class="text-xs text-muted">Track progress weekly.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Reports</p>
<p class="text-xs text-muted">Share wins with one link.</p>
</li>
</ul>
</div>
</BackgroundBoxes>---
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.astro";
---
<BackgroundBoxes
variant="flat"
color="success"
rows={8}
cols={14}
size={36}
class="rounded-xl border border-line bg-canvas p-6"
>
<div class="grid gap-4">
<h3 class="text-2xl font-semibold text-ink">
Everything in its place
</h3>
<ul class="grid grid-cols-2 gap-3">
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Boards</p>
<p class="text-xs text-muted">Plan work in columns.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Docs</p>
<p class="text-xs text-muted">Write specs next to tasks.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Goals</p>
<p class="text-xs text-muted">Track progress weekly.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Reports</p>
<p class="text-xs text-muted">Share wins with one link.</p>
</li>
</ul>
</div>
</BackgroundBoxes>import { Component } from "@angular/core";
import { BackgroundBoxes } from "./markas/background-boxes.component";
@Component({
selector: "markas-example",
imports: [BackgroundBoxes],
template: `
<div
markas-background-boxes
variant="flat"
color="success"
[rows]="8"
[cols]="14"
[size]="36"
class="rounded-xl border border-line bg-canvas p-6"
>
<div class="grid gap-4">
<h3 class="text-2xl font-semibold text-ink">Everything in its place</h3>
<ul class="grid grid-cols-2 gap-3">
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Boards</p>
<p class="text-xs text-muted">Plan work in columns.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Docs</p>
<p class="text-xs text-muted">Write specs next to tasks.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Goals</p>
<p class="text-xs text-muted">Track progress weekly.</p>
</li>
<li class="rounded-lg border border-line bg-surface p-3">
<p class="text-sm font-semibold text-ink">Reports</p>
<p class="text-xs text-muted">Share wins with one link.</p>
</li>
</ul>
</div>
</div>
`,
})
export default class BackgroundBoxesFeaturesExample {}Halaman 404 berperspektif
404
This tile is missing
The page may have moved. Try the dashboard instead.
404
This tile is missing
The page may have moved. Try the dashboard instead.
404
This tile is missing
The page may have moved. Try the dashboard instead.
404
This tile is missing
The page may have moved. Try the dashboard instead.
404
This tile is missing
The page may have moved. Try the dashboard instead.
<x-markas.background-boxes
variant="perspective"
color="warning"
:rows="14"
:cols="20"
class="rounded-xl border border-line bg-surface px-6 pt-10 pb-24"
>
<div class="grid justify-items-center gap-3 text-center">
<p class="text-6xl font-bold tracking-tight text-ink">404</p>
<h3 class="text-lg font-semibold text-ink">
This tile is missing
</h3>
<p class="max-w-72 text-sm text-muted">
The page may have moved. Try the dashboard instead.
</p>
<x-markas.button variant="secondary">Go to dashboard</x-markas.button>
</div>
</x-markas.background-boxes>import { BackgroundBoxes } from "@/components/markas/BackgroundBoxes";
import { Button } from "@/components/markas/Button";
export default function Example() {
return (
<BackgroundBoxes
variant="perspective"
color="warning"
rows={14}
cols={20}
className="rounded-xl border border-line bg-surface px-6 pt-10 pb-24"
>
<div className="grid justify-items-center gap-3 text-center">
<p className="text-6xl font-bold tracking-tight text-ink">404</p>
<h3 className="text-lg font-semibold text-ink">This tile is missing</h3>
<p className="max-w-72 text-sm text-muted">
The page may have moved. Try the dashboard instead.
</p>
<Button variant="secondary">Go to dashboard</Button>
</div>
</BackgroundBoxes>
);
}<script setup lang="ts">
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.vue";
import Button from "@/components/markas/Button.vue";
</script>
<template>
<BackgroundBoxes
variant="perspective"
color="warning"
:rows="14"
:cols="20"
class="rounded-xl border border-line bg-surface px-6 pt-10 pb-24"
>
<div class="grid justify-items-center gap-3 text-center">
<p class="text-6xl font-bold tracking-tight text-ink">404</p>
<h3 class="text-lg font-semibold text-ink">This tile is missing</h3>
<p class="max-w-72 text-sm text-muted">
The page may have moved. Try the dashboard instead.
</p>
<Button variant="secondary">Go to dashboard</Button>
</div>
</BackgroundBoxes>
</template><script lang="ts">
import BackgroundBoxes from "$lib/components/markas/BackgroundBoxes.svelte";
import Button from "$lib/components/markas/Button.svelte";
</script>
<BackgroundBoxes
variant="perspective"
color="warning"
rows={14}
cols={20}
class="rounded-xl border border-line bg-surface px-6 pt-10 pb-24"
>
<div class="grid justify-items-center gap-3 text-center">
<p class="text-6xl font-bold tracking-tight text-ink">404</p>
<h3 class="text-lg font-semibold text-ink">This tile is missing</h3>
<p class="max-w-72 text-sm text-muted">
The page may have moved. Try the dashboard instead.
</p>
<Button variant="secondary">Go to dashboard</Button>
</div>
</BackgroundBoxes>---
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.astro";
import Button from "@/components/markas/Button.astro";
---
<BackgroundBoxes
variant="perspective"
color="warning"
rows={14}
cols={20}
class="rounded-xl border border-line bg-surface px-6 pt-10 pb-24"
>
<div class="grid justify-items-center gap-3 text-center">
<p class="text-6xl font-bold tracking-tight text-ink">404</p>
<h3 class="text-lg font-semibold text-ink">This tile is missing</h3>
<p class="max-w-72 text-sm text-muted">
The page may have moved. Try the dashboard instead.
</p>
<Button variant="secondary">Go to dashboard</Button>
</div>
</BackgroundBoxes>import { Component } from "@angular/core";
import { BackgroundBoxes } from "./markas/background-boxes.component";
import { Button } from "./markas/button.component";
@Component({
selector: "markas-example",
imports: [BackgroundBoxes, Button],
template: `
<div
markas-background-boxes
variant="perspective"
color="warning"
[rows]="14"
[cols]="20"
class="rounded-xl border border-line bg-surface px-6 pt-10 pb-24"
>
<div class="grid justify-items-center gap-3 text-center">
<p class="text-6xl font-bold tracking-tight text-ink">404</p>
<h3 class="text-lg font-semibold text-ink">This tile is missing</h3>
<p class="max-w-72 text-sm text-muted">
The page may have moved. Try the dashboard instead.
</p>
<button markas-button variant="secondary">Go to dashboard</button>
</div>
</div>
`,
})
export default class BackgroundBoxesNotFoundExample {}Banner promo ringkas
Black Friday deal
Half off every annual plan.
Black Friday deal
Half off every annual plan.
Black Friday deal
Half off every annual plan.
Black Friday deal
Half off every annual plan.
Black Friday deal
Half off every annual plan.
<x-markas.background-boxes
color="danger"
:rows="10"
:cols="16"
:size="28"
speed="fast"
class="rounded-xl border border-line bg-surface p-6"
>
<div class="flex items-center justify-between gap-4">
<div class="grid gap-1">
<h3 class="text-lg font-semibold text-ink">Black Friday deal</h3>
<p class="text-sm text-muted">Half off every annual plan.</p>
</div>
<x-markas.button>Claim offer</x-markas.button>
</div>
</x-markas.background-boxes>import { BackgroundBoxes } from "@/components/markas/BackgroundBoxes";
import { Button } from "@/components/markas/Button";
export default function Example() {
return (
<BackgroundBoxes
color="danger"
rows={10}
cols={16}
size={28}
speed="fast"
className="rounded-xl border border-line bg-surface p-6"
>
<div className="flex items-center justify-between gap-4">
<div className="grid gap-1">
<h3 className="text-lg font-semibold text-ink">Black Friday deal</h3>
<p className="text-sm text-muted">Half off every annual plan.</p>
</div>
<Button>Claim offer</Button>
</div>
</BackgroundBoxes>
);
}<script setup lang="ts">
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.vue";
import Button from "@/components/markas/Button.vue";
</script>
<template>
<BackgroundBoxes
color="danger"
:rows="10"
:cols="16"
:size="28"
speed="fast"
class="rounded-xl border border-line bg-surface p-6"
>
<div class="flex items-center justify-between gap-4">
<div class="grid gap-1">
<h3 class="text-lg font-semibold text-ink">Black Friday deal</h3>
<p class="text-sm text-muted">Half off every annual plan.</p>
</div>
<Button>Claim offer</Button>
</div>
</BackgroundBoxes>
</template><script lang="ts">
import BackgroundBoxes from "$lib/components/markas/BackgroundBoxes.svelte";
import Button from "$lib/components/markas/Button.svelte";
</script>
<BackgroundBoxes
color="danger"
rows={10}
cols={16}
size={28}
speed="fast"
class="rounded-xl border border-line bg-surface p-6"
>
<div class="flex items-center justify-between gap-4">
<div class="grid gap-1">
<h3 class="text-lg font-semibold text-ink">Black Friday deal</h3>
<p class="text-sm text-muted">Half off every annual plan.</p>
</div>
<Button>Claim offer</Button>
</div>
</BackgroundBoxes>---
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.astro";
import Button from "@/components/markas/Button.astro";
---
<BackgroundBoxes
color="danger"
rows={10}
cols={16}
size={28}
speed="fast"
class="rounded-xl border border-line bg-surface p-6"
>
<div class="flex items-center justify-between gap-4">
<div class="grid gap-1">
<h3 class="text-lg font-semibold text-ink">Black Friday deal</h3>
<p class="text-sm text-muted">Half off every annual plan.</p>
</div>
<Button>Claim offer</Button>
</div>
</BackgroundBoxes>import { Component } from "@angular/core";
import { BackgroundBoxes } from "./markas/background-boxes.component";
import { Button } from "./markas/button.component";
@Component({
selector: "markas-example",
imports: [BackgroundBoxes, Button],
template: `
<div
markas-background-boxes
color="danger"
[rows]="10"
[cols]="16"
[size]="28"
speed="fast"
class="rounded-xl border border-line bg-surface p-6"
>
<div class="flex items-center justify-between gap-4">
<div class="grid gap-1">
<h3 class="text-lg font-semibold text-ink">Black Friday deal</h3>
<p class="text-sm text-muted">Half off every annual plan.</p>
</div>
<button markas-button>Claim offer</button>
</div>
</div>
`,
})
export default class BackgroundBoxesCtaExample {}Instalasi
npx markasui@latest add background-boxespnpm dlx markasui@latest add background-boxesyarn dlx markasui@latest add background-boxesbunx --bun markasui@latest add background-boxes- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
resources/views/components/markas/background-boxes.blade.php.
@props([
'variant' => 'skewed',
'rows' => 12,
'cols' => 18,
'size' => 40,
'speed' => 'normal',
'color' => 'primary',
])
@php
$base = 'relative isolate overflow-hidden';
$layer = 'absolute inset-0 overflow-hidden';
$grid = 'absolute top-1/2 left-1/2 grid grid-cols-[repeat(var(--markas-boxes-cols),var(--markas-boxes-size))] auto-rows-[var(--markas-boxes-size)] border-t border-l border-line';
$cell = 'border-r border-b border-line transition-colors duration-1000 ease-out hover:bg-current/40 hover:duration-0 motion-reduce:transition-none';
$ember = 'animate-[markas-boxes-glow_var(--markas-boxes-duration)_ease-in-out_infinite] motion-reduce:animate-none';
$content = 'pointer-events-none relative [&_:is(a,button,input,select,textarea,label,summary)]:pointer-events-auto';
$variants = [
'skewed' => ['layer' => '[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]', 'grid' => '[transform:translate(-50%,-50%)_skewX(-48deg)_skewY(14deg)]'],
'flat' => ['layer' => '[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]', 'grid' => '-translate-x-1/2 -translate-y-1/2'],
'perspective' => ['layer' => '[perspective:520px] [mask-image:linear-gradient(to_bottom,transparent_25%,black_60%)]', 'grid' => '[transform:translate(-50%,-38%)_rotateX(58deg)]'],
];
$colors = [
'muted' => 'text-muted',
'primary' => 'text-primary',
'success' => 'text-success',
'warning' => 'text-warning',
'danger' => 'text-danger',
];
$speeds = ['slow' => '9s', 'normal' => '6s', 'fast' => '3.5s'];
$keyframes = '@keyframes markas-boxes-glow{0%,100%{box-shadow:none}50%{box-shadow:inset 0 0 0 999px color-mix(in oklab,currentColor 30%,transparent)}}';
$maxCells = 600;
$maxSide = 40;
$emberTarget = 6;
$emberDelayMs = 700;
$shape = $variants[$variant] ?? $variants['skewed'];
$columns = max(1, min((int) $cols, $maxSide));
$total = min(max(1, min((int) $rows, $maxSide)) * $columns, $maxCells);
// Sel ke-i. Sekitar 6% sel (dua modulus berbeda supaya tidak membentuk garis) menyala pelan supaya latar terasa hidup tanpa hover.
$cells = [];
for ($i = 0; $i < $total; $i++) {
$lit = ($i * 7) % 13 + ($i * $i) % 11 === $emberTarget;
$cells[] = $lit ? ['class' => $cell.' '.$ember, 'style' => 'animation-delay: '.(($i % 9) * -$emberDelayMs).'ms'] : ['class' => $cell, 'style' => null];
}
$vars = '--markas-boxes-cols: '.$columns.'; --markas-boxes-size: '.(float) $size.'px; --markas-boxes-duration: '.($speeds[$speed] ?? $speeds['normal']);
@endphp
<div {{ $attributes->merge(['style' => $vars])->class([$base]) }}>
<style>{!! $keyframes !!}</style>
<div aria-hidden="true" wire:ignore @class([$layer, $shape['layer'], $colors[$color] ?? $colors['primary']])>
<div @class([$grid, $shape['grid']])>
@foreach ($cells as $item)
<span class="{{ $item['class'] }}" @if ($item['style']) style="{{ $item['style'] }}" @endif></span>
@endforeach
</div>
</div>
<div class="{{ $content }}">{{ $slot }}</div>
</div>- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/BackgroundBoxes.tsx.
import type { ComponentProps, CSSProperties } from "react";
const base = "relative isolate overflow-hidden";
const layer = "absolute inset-0 overflow-hidden";
const grid =
"absolute top-1/2 left-1/2 grid grid-cols-[repeat(var(--markas-boxes-cols),var(--markas-boxes-size))] auto-rows-[var(--markas-boxes-size)] border-t border-l border-line";
const cell =
"border-r border-b border-line transition-colors duration-1000 ease-out hover:bg-current/40 hover:duration-0 motion-reduce:transition-none";
const ember =
"animate-[markas-boxes-glow_var(--markas-boxes-duration)_ease-in-out_infinite] motion-reduce:animate-none";
const content =
"pointer-events-none relative [&_:is(a,button,input,select,textarea,label,summary)]:pointer-events-auto";
const variants = {
skewed: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "[transform:translate(-50%,-50%)_skewX(-48deg)_skewY(14deg)]",
},
flat: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "-translate-x-1/2 -translate-y-1/2",
},
perspective: {
layer:
"[perspective:520px] [mask-image:linear-gradient(to_bottom,transparent_25%,black_60%)]",
grid: "[transform:translate(-50%,-38%)_rotateX(58deg)]",
},
};
const colors = {
muted: "text-muted",
primary: "text-primary",
success: "text-success",
warning: "text-warning",
danger: "text-danger",
};
const speeds = { slow: "9s", normal: "6s", fast: "3.5s" };
const keyframes =
"@keyframes markas-boxes-glow{0%,100%{box-shadow:none}50%{box-shadow:inset 0 0 0 999px color-mix(in oklab,currentColor 30%,transparent)}}";
const MAX_CELLS = 600;
const MAX_SIDE = 40;
const EMBER_TARGET = 6;
const EMBER_DELAY_MS = 700;
const cx = (...c: (string | false | null | undefined)[]) =>
c.filter(Boolean).join(" ");
const side = (value: number) =>
Math.max(1, Math.min(Math.trunc(value), MAX_SIDE));
/** Sel ke-i. Sekitar 6% sel (dua modulus berbeda supaya tidak membentuk garis) menyala pelan supaya latar terasa hidup tanpa hover. */
function makeCells(rows: number, cols: number) {
const columns = side(cols);
const total = Math.min(side(rows) * columns, MAX_CELLS);
return Array.from({ length: total }, (_, index) => {
const lit = ((index * 7) % 13) + ((index * index) % 11) === EMBER_TARGET;
return lit
? { lit, style: { animationDelay: `${(index % 9) * -EMBER_DELAY_MS}ms` } }
: { lit, style: undefined };
});
}
export type BackgroundBoxesProps = ComponentProps<"div"> & {
variant?: keyof typeof variants;
rows?: number;
cols?: number;
size?: number;
speed?: keyof typeof speeds;
color?: keyof typeof colors;
};
export function BackgroundBoxes({
variant = "skewed",
rows = 12,
cols = 18,
size = 40,
speed = "normal",
color = "primary",
className,
style,
children,
...props
}: BackgroundBoxesProps) {
const vars = {
"--markas-boxes-cols": side(cols),
"--markas-boxes-size": `${size}px`,
"--markas-boxes-duration": speeds[speed],
} as CSSProperties;
return (
<div
{...props}
className={cx(base, className)}
style={{ ...vars, ...style }}
>
<style>{keyframes}</style>
<div
aria-hidden="true"
className={cx(layer, variants[variant].layer, colors[color])}
>
<div className={cx(grid, variants[variant].grid)}>
{makeCells(rows, cols).map((item, index) => (
<span
key={index}
className={cx(cell, item.lit && ember)}
style={item.style}
/>
))}
</div>
</div>
<div className={content}>{children}</div>
</div>
);
}- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/BackgroundBoxes.vue.
<script setup lang="ts">
import { computed } from "vue";
const base = "relative isolate overflow-hidden";
const layer = "absolute inset-0 overflow-hidden";
const grid =
"absolute top-1/2 left-1/2 grid grid-cols-[repeat(var(--markas-boxes-cols),var(--markas-boxes-size))] auto-rows-[var(--markas-boxes-size)] border-t border-l border-line";
const cell =
"border-r border-b border-line transition-colors duration-1000 ease-out hover:bg-current/40 hover:duration-0 motion-reduce:transition-none";
const ember =
"animate-[markas-boxes-glow_var(--markas-boxes-duration)_ease-in-out_infinite] motion-reduce:animate-none";
const content =
"pointer-events-none relative [&_:is(a,button,input,select,textarea,label,summary)]:pointer-events-auto";
const variants = {
skewed: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "[transform:translate(-50%,-50%)_skewX(-48deg)_skewY(14deg)]",
},
flat: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "-translate-x-1/2 -translate-y-1/2",
},
perspective: {
layer:
"[perspective:520px] [mask-image:linear-gradient(to_bottom,transparent_25%,black_60%)]",
grid: "[transform:translate(-50%,-38%)_rotateX(58deg)]",
},
};
const colors = {
muted: "text-muted",
primary: "text-primary",
success: "text-success",
warning: "text-warning",
danger: "text-danger",
};
const speeds = { slow: "9s", normal: "6s", fast: "3.5s" };
const keyframes =
"@keyframes markas-boxes-glow{0%,100%{box-shadow:none}50%{box-shadow:inset 0 0 0 999px color-mix(in oklab,currentColor 30%,transparent)}}";
const MAX_CELLS = 600;
const MAX_SIDE = 40;
const EMBER_TARGET = 6;
const EMBER_DELAY_MS = 700;
const side = (value: number) =>
Math.max(1, Math.min(Math.trunc(value), MAX_SIDE));
/** Sel ke-i. Sekitar 6% sel (dua modulus berbeda supaya tidak membentuk garis) menyala pelan supaya latar terasa hidup tanpa hover. */
function makeCells(rows: number, cols: number) {
const columns = side(cols);
const total = Math.min(side(rows) * columns, MAX_CELLS);
return Array.from({ length: total }, (_, index) => {
const lit = ((index * 7) % 13) + ((index * index) % 11) === EMBER_TARGET;
return lit
? { lit, style: { animationDelay: `${(index % 9) * -EMBER_DELAY_MS}ms` } }
: { lit, style: undefined };
});
}
const props = withDefaults(
defineProps<{
variant?: keyof typeof variants;
rows?: number;
cols?: number;
size?: number;
speed?: keyof typeof speeds;
color?: keyof typeof colors;
}>(),
{
variant: "skewed",
rows: 12,
cols: 18,
size: 40,
speed: "normal",
color: "primary",
},
);
const vars = computed(() => ({
"--markas-boxes-cols": side(props.cols),
"--markas-boxes-size": `${props.size}px`,
"--markas-boxes-duration": speeds[props.speed],
}));
const cells = computed(() => makeCells(props.rows, props.cols));
</script>
<template>
<div :class="base" :style="vars">
<component :is="'style'">{{ keyframes }}</component>
<div
aria-hidden="true"
:class="[layer, variants[props.variant].layer, colors[props.color]]"
>
<div :class="[grid, variants[props.variant].grid]">
<span
v-for="(item, index) in cells"
:key="index"
:class="[cell, item.lit && ember]"
:style="item.style"
/>
</div>
</div>
<div :class="content"><slot /></div>
</div>
</template>- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/lib/components/markas/BackgroundBoxes.svelte.
<script lang="ts">
import type { Snippet } from "svelte";
import type { HTMLAttributes } from "svelte/elements";
const base = "relative isolate overflow-hidden";
const layer = "absolute inset-0 overflow-hidden";
const grid =
"absolute top-1/2 left-1/2 grid grid-cols-[repeat(var(--markas-boxes-cols),var(--markas-boxes-size))] auto-rows-[var(--markas-boxes-size)] border-t border-l border-line";
const cell =
"border-r border-b border-line transition-colors duration-1000 ease-out hover:bg-current/40 hover:duration-0 motion-reduce:transition-none";
const ember =
"animate-[markas-boxes-glow_var(--markas-boxes-duration)_ease-in-out_infinite] motion-reduce:animate-none";
const content =
"pointer-events-none relative [&_:is(a,button,input,select,textarea,label,summary)]:pointer-events-auto";
const variants = {
skewed: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "[transform:translate(-50%,-50%)_skewX(-48deg)_skewY(14deg)]",
},
flat: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "-translate-x-1/2 -translate-y-1/2",
},
perspective: {
layer:
"[perspective:520px] [mask-image:linear-gradient(to_bottom,transparent_25%,black_60%)]",
grid: "[transform:translate(-50%,-38%)_rotateX(58deg)]",
},
};
const colors = {
muted: "text-muted",
primary: "text-primary",
success: "text-success",
warning: "text-warning",
danger: "text-danger",
};
const speeds = { slow: "9s", normal: "6s", fast: "3.5s" };
const keyframes =
"@keyframes markas-boxes-glow{0%,100%{box-shadow:none}50%{box-shadow:inset 0 0 0 999px color-mix(in oklab,currentColor 30%,transparent)}}";
const MAX_CELLS = 600;
const MAX_SIDE = 40;
const EMBER_TARGET = 6;
const EMBER_DELAY_MS = 700;
const side = (value: number) =>
Math.max(1, Math.min(Math.trunc(value), MAX_SIDE));
/** Sel ke-i. Sekitar 6% sel (dua modulus berbeda supaya tidak membentuk garis) menyala pelan supaya latar terasa hidup tanpa hover. */
function makeCells(rows: number, cols: number) {
const columns = side(cols);
const total = Math.min(side(rows) * columns, MAX_CELLS);
return Array.from({ length: total }, (_, index) => {
const lit = ((index * 7) % 13) + ((index * index) % 11) === EMBER_TARGET;
return lit
? { lit, style: `animation-delay:${(index % 9) * -EMBER_DELAY_MS}ms` }
: { lit, style: undefined };
});
}
type Props = HTMLAttributes<HTMLDivElement> & {
variant?: keyof typeof variants;
rows?: number;
cols?: number;
size?: number;
speed?: keyof typeof speeds;
color?: keyof typeof colors;
children?: Snippet;
};
let {
variant = "skewed",
rows = 12,
cols = 18,
size = 40,
speed = "normal",
color = "primary",
class: className,
style,
children,
...rest
}: Props = $props();
const vars = $derived(
`--markas-boxes-cols:${side(cols)};--markas-boxes-size:${size}px;--markas-boxes-duration:${speeds[speed]}`,
);
const cells = $derived(makeCells(rows, cols));
</script>
<div {...rest} class={[base, className]} style="{vars};{style ?? ''}">
{@html `<style>${keyframes}</style>`}
<div
aria-hidden="true"
class={[layer, variants[variant].layer, colors[color]]}
>
<div class={[grid, variants[variant].grid]}>
{#each cells as item, index (index)}
<span class={[cell, item.lit && ember]} style={item.style}></span>
{/each}
</div>
</div>
<div class={content}>{@render children?.()}</div>
</div>- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/components/markas/BackgroundBoxes.astro.
---
import type { HTMLAttributes } from "astro/types";
const base = "relative isolate overflow-hidden";
const layer = "absolute inset-0 overflow-hidden";
const grid =
"absolute top-1/2 left-1/2 grid grid-cols-[repeat(var(--markas-boxes-cols),var(--markas-boxes-size))] auto-rows-[var(--markas-boxes-size)] border-t border-l border-line";
const cell =
"border-r border-b border-line transition-colors duration-1000 ease-out hover:bg-current/40 hover:duration-0 motion-reduce:transition-none";
const ember =
"animate-[markas-boxes-glow_var(--markas-boxes-duration)_ease-in-out_infinite] motion-reduce:animate-none";
const content =
"pointer-events-none relative [&_:is(a,button,input,select,textarea,label,summary)]:pointer-events-auto";
const variants = {
skewed: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "[transform:translate(-50%,-50%)_skewX(-48deg)_skewY(14deg)]",
},
flat: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "-translate-x-1/2 -translate-y-1/2",
},
perspective: {
layer:
"[perspective:520px] [mask-image:linear-gradient(to_bottom,transparent_25%,black_60%)]",
grid: "[transform:translate(-50%,-38%)_rotateX(58deg)]",
},
};
const colors = {
muted: "text-muted",
primary: "text-primary",
success: "text-success",
warning: "text-warning",
danger: "text-danger",
};
const speeds = { slow: "9s", normal: "6s", fast: "3.5s" };
const keyframes =
"@keyframes markas-boxes-glow{0%,100%{box-shadow:none}50%{box-shadow:inset 0 0 0 999px color-mix(in oklab,currentColor 30%,transparent)}}";
const MAX_CELLS = 600;
const MAX_SIDE = 40;
const EMBER_TARGET = 6;
const EMBER_DELAY_MS = 700;
const side = (value: number) =>
Math.max(1, Math.min(Math.trunc(value), MAX_SIDE));
/** Sel ke-i. Sekitar 6% sel (dua modulus berbeda supaya tidak membentuk garis) menyala pelan supaya latar terasa hidup tanpa hover. */
function makeCells(rows: number, cols: number) {
const columns = side(cols);
const total = Math.min(side(rows) * columns, MAX_CELLS);
return Array.from({ length: total }, (_, index) => {
const lit = ((index * 7) % 13) + ((index * index) % 11) === EMBER_TARGET;
return lit
? { lit, style: `animation-delay:${(index % 9) * -EMBER_DELAY_MS}ms` }
: { lit, style: undefined };
});
}
type Props = Omit<HTMLAttributes<"div">, "style"> & {
variant?: keyof typeof variants;
rows?: number;
cols?: number;
size?: number;
speed?: keyof typeof speeds;
color?: keyof typeof colors;
style?: string;
};
const {
variant = "skewed",
rows = 12,
cols = 18,
size = 40,
speed = "normal",
color = "primary",
class: className,
style,
...rest
} = Astro.props;
const vars = `--markas-boxes-cols:${side(cols)};--markas-boxes-size:${size}px;--markas-boxes-duration:${speeds[speed]}`;
---
<div {...rest} class:list={[base, className]} style={`${vars};${style ?? ""}`}>
<style is:inline set:html={keyframes} />
<div
aria-hidden="true"
class:list={[layer, variants[variant].layer, colors[color]]}
>
<div class:list={[grid, variants[variant].grid]}>
{
makeCells(rows, cols).map((item) => (
<span class:list={[cell, item.lit && ember]} style={item.style} />
))
}
</div>
</div>
<div class={content}><slot /></div>
</div>- Pastikan Tailwind CSS v4 dan markas.css sudah terpasang. Lihat Instalasi.
- Salin source komponen di bawah ini ke
src/app/markas/background-boxes.component.ts.
import {
ChangeDetectionStrategy,
Component,
computed,
input,
numberAttribute,
ViewEncapsulation,
} from "@angular/core";
const base = "relative isolate overflow-hidden";
const layer = "absolute inset-0 overflow-hidden";
const grid =
"absolute top-1/2 left-1/2 grid grid-cols-[repeat(var(--markas-boxes-cols),var(--markas-boxes-size))] auto-rows-[var(--markas-boxes-size)] border-t border-l border-line";
const cell =
"border-r border-b border-line transition-colors duration-1000 ease-out hover:bg-current/40 hover:duration-0 motion-reduce:transition-none";
const ember =
"animate-[markas-boxes-glow_var(--markas-boxes-duration)_ease-in-out_infinite] motion-reduce:animate-none";
const content =
"pointer-events-none relative [&_:is(a,button,input,select,textarea,label,summary)]:pointer-events-auto";
const variants = {
skewed: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "[transform:translate(-50%,-50%)_skewX(-48deg)_skewY(14deg)]",
},
flat: {
layer:
"[mask-image:radial-gradient(ellipse_at_center,black_40%,transparent_85%)]",
grid: "-translate-x-1/2 -translate-y-1/2",
},
perspective: {
layer:
"[perspective:520px] [mask-image:linear-gradient(to_bottom,transparent_25%,black_60%)]",
grid: "[transform:translate(-50%,-38%)_rotateX(58deg)]",
},
};
const colors = {
muted: "text-muted",
primary: "text-primary",
success: "text-success",
warning: "text-warning",
danger: "text-danger",
};
const speeds = { slow: "9s", normal: "6s", fast: "3.5s" };
const keyframes =
"@keyframes markas-boxes-glow{0%,100%{box-shadow:none}50%{box-shadow:inset 0 0 0 999px color-mix(in oklab,currentColor 30%,transparent)}}";
const MAX_CELLS = 600;
const MAX_SIDE = 40;
const EMBER_TARGET = 6;
const EMBER_DELAY_MS = 700;
export type BackgroundBoxesVariant = keyof typeof variants;
export type BackgroundBoxesSpeed = keyof typeof speeds;
export type BackgroundBoxesColor = keyof typeof colors;
const side = (value: number) =>
Math.max(1, Math.min(Math.trunc(value), MAX_SIDE));
/** Sel ke-i. Sekitar 6% sel (dua modulus berbeda supaya tidak membentuk garis) menyala pelan supaya latar terasa hidup tanpa hover. */
function makeCells(rows: number, cols: number) {
const columns = side(cols);
const total = Math.min(side(rows) * columns, MAX_CELLS);
return Array.from({ length: total }, (_, index) => {
const lit = ((index * 7) % 13) + ((index * index) % 11) === EMBER_TARGET;
return lit
? {
className: `${cell} ${ember}`,
style: `animation-delay:${(index % 9) * -EMBER_DELAY_MS}ms`,
}
: { className: cell, style: null };
});
}
/**
* Attribute selector on a native div: the user's class, style, and attributes stay on the
* root. The keyframes are a global style, so encapsulation is off.
*/
@Component({
selector: "div[markas-background-boxes]",
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
styles: [keyframes],
host: {
"[class]": "base",
"[style.--markas-boxes-cols]": "columns()",
"[style.--markas-boxes-size]": "size() + 'px'",
"[style.--markas-boxes-duration]": "duration()",
},
template: `
<div aria-hidden="true" [class]="layerClasses()">
<div [class]="gridClasses()">
@for (item of cells(); track $index) {
<span [class]="item.className" [style]="item.style"></span>
}
</div>
</div>
<div [class]="content"><ng-content /></div>
`,
})
export class BackgroundBoxes {
readonly variant = input<BackgroundBoxesVariant>("skewed");
readonly rows = input(12, { transform: numberAttribute });
readonly cols = input(18, { transform: numberAttribute });
readonly size = input(40, { transform: numberAttribute });
readonly speed = input<BackgroundBoxesSpeed>("normal");
readonly color = input<BackgroundBoxesColor>("primary");
protected readonly base = base;
protected readonly content = content;
protected readonly columns = computed(() => side(this.cols()));
protected readonly duration = computed(() => speeds[this.speed()]);
protected readonly layerClasses = computed(
() => `${layer} ${variants[this.variant()].layer} ${colors[this.color()]}`,
);
protected readonly gridClasses = computed(
() => `${grid} ${variants[this.variant()].grid}`,
);
protected readonly cells = computed(() =>
makeCells(this.rows(), this.cols()),
);
}Pemakaian
<x-markas.background-boxes variant="skewed" :rows="12" :cols="18" class="rounded-xl bg-surface px-6 py-16">
<h2 class="text-center text-3xl font-bold text-ink">Desain per blok</h2>
</x-markas.background-boxes>Tidak butuh JavaScript atau Alpine.js.
import { BackgroundBoxes } from "@/components/markas/BackgroundBoxes";
<BackgroundBoxes
variant="skewed"
rows={12}
cols={18}
className="rounded-xl bg-surface px-6 py-16"
>
<h2 className="text-center text-3xl font-bold text-ink">Desain per blok</h2>
</BackgroundBoxes>;<template>
<BackgroundBoxes
variant="skewed"
:rows="12"
:cols="18"
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Desain per blok</h2>
</BackgroundBoxes>
</template><script lang="ts">
import BackgroundBoxes from "$lib/components/markas/BackgroundBoxes.svelte";
</script>
<BackgroundBoxes
variant="skewed"
rows={12}
cols={18}
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Desain per blok</h2>
</BackgroundBoxes>---
import BackgroundBoxes from "@/components/markas/BackgroundBoxes.astro";
---
<BackgroundBoxes
variant="skewed"
rows={12}
cols={18}
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Desain per blok</h2>
</BackgroundBoxes>Tanpa JavaScript di browser; markup dirender di server.
import { Component } from "@angular/core";
import { BackgroundBoxes } from "./markas/background-boxes.component";
@Component({
selector: "app-hero",
imports: [BackgroundBoxes],
template: `
<div
markas-background-boxes
variant="skewed"
[rows]="12"
[cols]="18"
class="rounded-xl bg-surface px-6 py-16"
>
<h2 class="text-center text-3xl font-bold text-ink">Desain per blok</h2>
</div>
`,
})
export class Hero {}Komponen ini berupa atribut pada div, jadi class, style, dan atribut lain tetap di elemen akar.
- Kotak menyala dengan CSS
:hoverbiasa dan memudar dalam satu detik. Di layar sentuh, beberapa kotak tetap menyala sendiri. - Pembungkus konten meneruskan pointer ke grid. Tautan, tombol, label, dan kolom form tetap bisa diklik; teks di dalam konten tidak bisa dipilih dengan mouse.
- Jaga rows kali cols tetap kecil: grid berhenti di 600 kotak.
- Komponen ini tidak punya teks bawaan, jadi tidak ada prop label yang perlu diterjemahkan.
Props
| Nama | Tipe | Default | Keterangan |
|---|---|---|---|
variant | skewed | flat | perspective | skewed | skewed memiringkan grid seperti lantai isometrik, flat membuatnya lurus, perspective merebahkannya ke arah cakrawala. |
rows | number | 12 | Jumlah baris, maksimal 40. Grid berhenti di 600 kotak. |
cols | number | 18 | Jumlah kolom, maksimal 40. |
size | number | 40 | Ukuran kotak dalam piksel. |
speed | slow | normal | fast | normal | Siklus beberapa kotak yang menyala sendiri: 9s, 6s, atau 3.5s. |
color | muted | primary | success | warning | danger | primary | Warna token saat kotak menyala. |
children / slot | slot / ReactNode / snippet | - | Konten yang tampil di atas grid. |
Aksesibilitas
- Grid memakai aria-hidden dan kotaknya tidak bisa difokus.
- Konten meneruskan pointer ke grid, kecuali tautan, tombol, label, dan kolom form yang tetap bisa diklik.
- Dengan reduced motion, kotak berhenti menyala sendiri dan berganti warna tanpa transisi.
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 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.
- Grid PatternGaris grid tipis di belakang konten, dengan sel sorotan yang berdenyut lembut dan pudar opsional.