Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Dot Pattern

    Grid titik kecil di belakang konten, dengan pudar radial atau linear opsional. Murni CSS, tanpa JavaScript.

    Version 2.0 is out

    Build interfaces that feel at home

    Copy the components you need into your project and make them yours.

    Version 2.0 is out

    Build interfaces that feel at home

    Copy the components you need into your project and make them yours.

    Version 2.0 is out

    Build interfaces that feel at home

    Copy the components you need into your project and make them yours.

    Version 2.0 is out

    Build interfaces that feel at home

    Copy the components you need into your project and make them yours.

    Version 2.0 is out

    Build interfaces that feel at home

    Copy the components you need into your project and make them yours.

    <x-markas.dot-pattern mask="radial" class="rounded-xl border border-line bg-surface px-6 py-12">
        <div class="grid justify-items-center gap-4 text-center">
            <p class="rounded-full border border-line bg-surface px-3 py-1 text-xs font-medium text-muted">Version 2.0 is out</p>
            <h2 class="text-2xl font-semibold text-balance text-ink">Build interfaces that feel at home</h2>
            <p class="max-w-80 text-sm text-muted">Copy the components you need into your project and make them yours.</p>
            <div class="flex gap-2">
                <x-markas.button>Get started</x-markas.button>
                <x-markas.button variant="secondary">View docs</x-markas.button>
            </div>
        </div>
    </x-markas.dot-pattern>
    import { Button } from "@/components/markas/Button";
    import { DotPattern } from "@/components/markas/DotPattern";
    
    export default function DotPatternExample() {
      return (
        <DotPattern
          mask="radial"
          className="rounded-xl border border-line bg-surface px-6 py-12"
        >
          <div className="grid justify-items-center gap-4 text-center">
            <p className="rounded-full border border-line bg-surface px-3 py-1 text-xs font-medium text-muted">
              Version 2.0 is out
            </p>
            <h2 className="text-2xl font-semibold text-balance text-ink">
              Build interfaces that feel at home
            </h2>
            <p className="max-w-80 text-sm text-muted">
              Copy the components you need into your project and make them yours.
            </p>
            <div className="flex gap-2">
              <Button>Get started</Button>
              <Button variant="secondary">View docs</Button>
            </div>
          </div>
        </DotPattern>
      );
    }
    <script setup lang="ts">
    import Button from "@/components/markas/Button.vue";
    import DotPattern from "@/components/markas/DotPattern.vue";
    </script>
    
    <template>
      <DotPattern
        mask="radial"
        class="rounded-xl border border-line bg-surface px-6 py-12"
      >
        <div class="grid justify-items-center gap-4 text-center">
          <p
            class="rounded-full border border-line bg-surface px-3 py-1 text-xs font-medium text-muted"
          >
            Version 2.0 is out
          </p>
          <h2 class="text-2xl font-semibold text-balance text-ink">
            Build interfaces that feel at home
          </h2>
          <p class="max-w-80 text-sm text-muted">
            Copy the components you need into your project and make them yours.
          </p>
          <div class="flex gap-2">
            <Button>Get started</Button>
            <Button variant="secondary">View docs</Button>
          </div>
        </div>
      </DotPattern>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import DotPattern from "$lib/components/markas/DotPattern.svelte";
    </script>
    
    <DotPattern
      mask="radial"
      class="rounded-xl border border-line bg-surface px-6 py-12"
    >
      <div class="grid justify-items-center gap-4 text-center">
        <p
          class="rounded-full border border-line bg-surface px-3 py-1 text-xs font-medium text-muted"
        >
          Version 2.0 is out
        </p>
        <h2 class="text-2xl font-semibold text-balance text-ink">
          Build interfaces that feel at home
        </h2>
        <p class="max-w-80 text-sm text-muted">
          Copy the components you need into your project and make them yours.
        </p>
        <div class="flex gap-2">
          <Button>Get started</Button>
          <Button variant="secondary">View docs</Button>
        </div>
      </div>
    </DotPattern>
    ---
    import Button from "@/components/markas/Button.astro";
    import DotPattern from "@/components/markas/DotPattern.astro";
    ---
    
    <DotPattern
      mask="radial"
      class="rounded-xl border border-line bg-surface px-6 py-12"
    >
      <div class="grid justify-items-center gap-4 text-center">
        <p class="rounded-full border border-line bg-surface px-3 py-1 text-xs font-medium text-muted">
          Version 2.0 is out
        </p>
        <h2 class="text-2xl font-semibold text-balance text-ink">
          Build interfaces that feel at home
        </h2>
        <p class="max-w-80 text-sm text-muted">
          Copy the components you need into your project and make them yours.
        </p>
        <div class="flex gap-2">
          <Button>Get started</Button>
          <Button variant="secondary">View docs</Button>
        </div>
      </div>
    </DotPattern>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { DotPattern } from "./markas/dot-pattern.component";
    
    @Component({
      selector: "markas-example",
      imports: [Button, DotPattern],
      template: `
        <div
          markas-dot-pattern
          mask="radial"
          class="rounded-xl border border-line bg-surface px-6 py-12"
        >
          <div class="grid justify-items-center gap-4 text-center">
            <p
              class="rounded-full border border-line bg-surface px-3 py-1 text-xs font-medium text-muted"
            >
              Version 2.0 is out
            </p>
            <h2 class="text-2xl font-semibold text-balance text-ink">
              Build interfaces that feel at home
            </h2>
            <p class="max-w-80 text-sm text-muted">
              Copy the components you need into your project and make them yours.
            </p>
            <div class="flex gap-2">
              <button markas-button>Get started</button>
              <button markas-button variant="secondary">View docs</button>
            </div>
          </div>
        </div>
      `,
    })
    export default class DotPatternFixture {}

    Contoh

    Kartu CTA

    Ready to launch your next project?

    Start with a free workspace. Upgrade when your team grows.

    Ready to launch your next project?

    Start with a free workspace. Upgrade when your team grows.

    Ready to launch your next project?

    Start with a free workspace. Upgrade when your team grows.

    Ready to launch your next project?

    Start with a free workspace. Upgrade when your team grows.

    Ready to launch your next project?

    Start with a free workspace. Upgrade when your team grows.

    Empty state

    No projects yet

    Create your first project to start tracking work.

    No projects yet

    Create your first project to start tracking work.

    No projects yet

    Create your first project to start tracking work.

    No projects yet

    Create your first project to start tracking work.

    No projects yet

    Create your first project to start tracking work.

    Section statistik

    Trusted by teams in 40 countries

    Uptime
    99.99%
    Median latency
    38 ms
    Regions
    24

    Trusted by teams in 40 countries

    Uptime
    99.99%
    Median latency
    38 ms
    Regions
    24

    Trusted by teams in 40 countries

    Uptime
    99.99%
    Median latency
    38 ms
    Regions
    24

    Trusted by teams in 40 countries

    Uptime
    99.99%
    Median latency
    38 ms
    Regions
    24

    Trusted by teams in 40 countries

    Uptime
    99.99%
    Median latency
    38 ms
    Regions
    24

    Instalasi

    npx markasui@latest add dot-pattern

    Pemakaian

    <x-markas.dot-pattern mask="radial" class="rounded-xl border border-line bg-surface px-6 py-12">
        <h2 class="text-2xl font-semibold text-ink">Bangun antarmuka yang terasa akrab</h2>
        <x-markas.button>Mulai sekarang</x-markas.button>
    </x-markas.dot-pattern>

    Tidak butuh JavaScript atau Alpine.js.

    import { Button } from "@/components/markas/Button";
    import { DotPattern } from "@/components/markas/DotPattern";
    
    <DotPattern
      mask="radial"
      className="rounded-xl border border-line bg-surface px-6 py-12"
    >
      <h2 className="text-2xl font-semibold text-ink">
        Bangun antarmuka yang terasa akrab
      </h2>
      <Button>Mulai sekarang</Button>
    </DotPattern>;
    <template>
      <DotPattern
        mask="radial"
        class="rounded-xl border border-line bg-surface px-6 py-12"
      >
        <h2 class="text-2xl font-semibold text-ink">
          Bangun antarmuka yang terasa akrab
        </h2>
        <Button>Mulai sekarang</Button>
      </DotPattern>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import DotPattern from "$lib/components/markas/DotPattern.svelte";
    </script>
    
    <DotPattern
      mask="radial"
      class="rounded-xl border border-line bg-surface px-6 py-12"
    >
      <h2 class="text-2xl font-semibold text-ink">
        Bangun antarmuka yang terasa akrab
      </h2>
      <Button>Mulai sekarang</Button>
    </DotPattern>
    ---
    import Button from "@/components/markas/Button.astro";
    import DotPattern from "@/components/markas/DotPattern.astro";
    ---
    
    <DotPattern
      mask="radial"
      class="rounded-xl border border-line bg-surface px-6 py-12"
    >
      <h2 class="text-2xl font-semibold text-ink">
        Bangun antarmuka yang terasa akrab
      </h2>
      <Button>Mulai sekarang</Button>
    </DotPattern>

    Tanpa JavaScript di browser; markup dirender di server.

    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { DotPattern } from "./markas/dot-pattern.component";
    
    @Component({
      selector: "app-hero",
      imports: [Button, DotPattern],
      template: `
        <div
          markas-dot-pattern
          mask="radial"
          class="rounded-xl border border-line bg-surface px-6 py-12"
        >
          <h2 class="text-2xl font-semibold text-ink">
            Bangun antarmuka yang terasa akrab
          </h2>
          <button markas-button>Mulai sekarang</button>
        </div>
      `,
    })
    export class Hero {}

    Komponen ini berupa atribut pada div, jadi class, style, dan atribut lain tetap di elemen akar.

    • spacing dan dotSize dalam piksel. Pakai color untuk warna token dan mask untuk memudarkan tepi.
    • Murni CSS: tanpa JavaScript dan tanpa animasi, jadi tidak membebani runtime.
    • Komponen ini tidak punya teks bawaan, jadi tidak ada prop label yang perlu diterjemahkan.

    Props

    NamaTipeDefaultKeterangan
    spacingnumber16Jarak antartitik dalam piksel. Nilai lebih kecil membuat pola lebih rapat.
    dotSizenumber1Jari-jari titik dalam piksel.
    colormuted | primary | success | warning | dangermutedWarna token titik, sudah dilembutkan dengan opacity.
    masknone | radial | linearnonePudarkan titik ke arah tepi (radial) atau ke bawah (linear).
    children / slotslot / ReactNode / snippet-Konten yang tampil di atas pola.

    Aksesibilitas

    • Lapisan pola memakai aria-hidden dan mengabaikan pointer, jadi hanya konten yang dibacakan dan bisa diklik.
    • Perhatikan kontras teks: pasang pola di bg-surface atau bg-canvas dan pakai mask di belakang teks panjang.

    Komponen terkait

    Komponen latar lain dengan class yang sama di setiap framework.