Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Background Lines

    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>
    import { BackgroundLines } from "@/components/markas/BackgroundLines";
    import { Button } from "@/components/markas/Button";
    
    export default function BackgroundLinesExample() {
      return (
        <BackgroundLines 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">
              Ideas in motion
            </h2>
            <p className="max-w-72 text-sm text-muted">
              Sketch, review, and ship product updates in one calm workspace.
            </p>
            <Button>Start sketching</Button>
          </div>
        </BackgroundLines>
      );
    }
    <script setup lang="ts">
    import BackgroundLines from "@/components/markas/BackgroundLines.vue";
    import Button from "@/components/markas/Button.vue";
    </script>
    
    <template>
      <BackgroundLines 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>
          <Button>Start sketching</Button>
        </div>
      </BackgroundLines>
    </template>
    <script lang="ts">
      import BackgroundLines from "$lib/components/markas/BackgroundLines.svelte";
      import Button from "$lib/components/markas/Button.svelte";
    </script>
    
    <BackgroundLines 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>
        <Button>Start sketching</Button>
      </div>
    </BackgroundLines>
    ---
    import BackgroundLines from "@/components/markas/BackgroundLines.astro";
    import Button from "@/components/markas/Button.astro";
    ---
    
    <BackgroundLines 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>
        <Button>Start sketching</Button>
      </div>
    </BackgroundLines>
    import { Component } from "@angular/core";
    import { BackgroundLines } from "./markas/background-lines.component";
    import { Button } from "./markas/button.component";
    
    @Component({
      selector: "markas-example",
      imports: [BackgroundLines, Button],
      template: `
        <div
          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>
            <button markas-button>Start sketching</button>
          </div>
        </div>
      `,
    })
    export default class BackgroundLinesFixture {}

    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

    Sign in

    Use your work email to continue.

    Sign in

    Use your work email to continue.

    Sign in

    Use your work email to continue.

    Sign in

    Use your work email to continue.

    Sign in

    Use your work email to continue.

    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-lines

    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.
    • rays memancar 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

    NamaTipeDefaultKeterangan
    variantwaves | rays | latticewaveswaves menumpuk kurva lembut, rays memancarkan garis dari tengah atas, lattice menyilangkan garis diagonal.
    countnumber12Jumlah garis, maksimal 24.
    speedslow | normal | fastnormalPanjang satu siklus gambar dan pudar: 12s, 8s, atau 5s.
    colormuted | primary | success | warning | dangerprimaryWarna token garis.
    children / slotslot / 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.