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>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.
<x-markas.dot-pattern color="primary" mask="linear" :spacing="20" class="rounded-xl border border-line bg-surface p-6">
<div class="grid gap-4">
<div class="grid gap-1.5">
<h3 class="text-lg font-semibold text-ink">Ready to launch your next project?</h3>
<p class="text-sm text-muted">Start with a free workspace. Upgrade when your team grows.</p>
</div>
<div class="flex gap-2">
<x-markas.button>Create workspace</x-markas.button>
<x-markas.button variant="ghost">Talk to sales</x-markas.button>
</div>
</div>
</x-markas.dot-pattern>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.
<x-markas.dot-pattern mask="radial" :spacing="12" class="rounded-xl border border-dashed border-line bg-canvas px-6 py-10">
<div class="grid justify-items-center gap-3 text-center">
<span class="grid size-12 place-items-center rounded-full border border-line bg-surface text-muted">
<svg class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><path d="M12 11v5m-2.5-2.5h5" /></svg>
</span>
<div class="grid gap-1">
<h3 class="text-base font-semibold text-ink">No projects yet</h3>
<p class="text-sm text-muted">Create your first project to start tracking work.</p>
</div>
<x-markas.button size="sm">New project</x-markas.button>
</div>
</x-markas.dot-pattern>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-patternpnpm dlx markasui@latest add dot-patternyarn dlx markasui@latest add dot-patternbunx --bun markasui@latest add dot-pattern- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
resources/views/components/markas/dot-pattern.blade.php.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/DotPattern.tsx.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/DotPattern.vue.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/lib/components/markas/DotPattern.svelte.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/DotPattern.astro.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/app/markas/dot-pattern.component.ts.
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.
spacinganddotSizeare in pixels. Usecolorfor a token tint andmaskto 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
| Name | Type | Default | Description |
|---|---|---|---|
spacing | number | 16 | Distance between dots in pixels. Smaller values make a denser pattern. |
dotSize | number | 1 | Dot radius in pixels. |
color | muted | primary | success | warning | danger | muted | Token color of the dots, already softened with opacity. |
mask | none | radial | linear | none | Fade the dots toward the edges (radial) or toward the bottom (linear). |
children / slot | slot / 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.
- Aurora BackgroundSoft glowing color fields that drift slowly behind your content, made from primary and an accent token.
- Background BeamsThin curved light beams that flow, pulse, or fall and splash behind your content. Pure SVG and CSS, no JavaScript.
- Background BoxesA skewed, flat, or perspective grid of tiles that light up under the cursor and fade back, using only CSS hover.
- Background LinesSVG lines that draw in and fade out one after another, as waves, rays from a point, or a lattice. Made for hero sections.
- Gradient BorderWraps a card, button, or field in a moving gradient border that spins, shines, or pulses, with an optional soft glow.
- Grid PatternThin grid lines behind your content, with highlighted cells that pulse softly and an optional fade.