Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Dot Pattern

    A grid of small dots behind your content, with an optional radial or linear fade. Pure CSS, no 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 {}

    Examples

    CTA card

    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.

    Stats section

    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

    Installation

    npx markasui@latest add dot-pattern

    Usage

    <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">Build interfaces that feel at home</h2>
        <x-markas.button>Get started</x-markas.button>
    </x-markas.dot-pattern>

    No JavaScript or Alpine.js needed.

    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">
        Build interfaces that feel at home
      </h2>
      <Button>Get started</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">
          Build interfaces that feel at home
        </h2>
        <Button>Get started</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">
        Build interfaces that feel at home
      </h2>
      <Button>Get started</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">
        Build interfaces that feel at home
      </h2>
      <Button>Get started</Button>
    </DotPattern>

    No client-side JavaScript; the markup is rendered on the 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">
            Build interfaces that feel at home
          </h2>
          <button markas-button>Get started</button>
        </div>
      `,
    })
    export class Hero {}

    The component is an attribute on a div, so class, style, and other attributes stay on the root element.

    • spacing and dotSize are in pixels. Use color for a token tint and mask to fade the edges.
    • Pure CSS: no JavaScript and nothing to animate, so it costs nothing at runtime.
    • The component has no built-in text, so there are no label props to translate.

    Props

    NameTypeDefaultDescription
    spacingnumber16Distance between dots in pixels. Smaller values make a denser pattern.
    dotSizenumber1Dot radius in pixels.
    colormuted | primary | success | warning | dangermutedToken color of the dots, already softened with opacity.
    masknone | radial | linearnoneFade the dots toward the edges (radial) or toward the bottom (linear).
    children / slotslot / ReactNode / snippet-Content shown on top of the pattern.

    Accessibility

    • The pattern layer is aria-hidden and ignores pointer events, so only your content is announced and clickable.
    • Keep text contrast in mind: put the pattern on bg-surface or bg-canvas and use a mask behind long text.

    Related components

    More backgrounds components with the same classes in every framework.