A field of twinkling stars placed from a fixed seed, so every render looks the same. Best in dark mode.
Launch week, day 3
Deploys that ship while you sleep
Schedule releases for any time zone and wake up to a green dashboard.
Launch week, day 3
Deploys that ship while you sleep
Schedule releases for any time zone and wake up to a green dashboard.
Launch week, day 3
Deploys that ship while you sleep
Schedule releases for any time zone and wake up to a green dashboard.
Launch week, day 3
Deploys that ship while you sleep
Schedule releases for any time zone and wake up to a green dashboard.
Launch week, day 3
Deploys that ship while you sleep
Schedule releases for any time zone and wake up to a green dashboard.
<x-markas.stars-background :count="120" class="rounded-xl border border-line bg-surface px-6 py-14">
<div class="grid justify-items-center gap-4 text-center">
<p class="text-sm font-medium text-muted">Launch week, day 3</p>
<h2 class="text-2xl font-semibold text-balance text-ink">Deploys that ship while you sleep</h2>
<p class="max-w-80 text-sm text-muted">Schedule releases for any time zone and wake up to a green dashboard.</p>
<x-markas.button>Read the announcement</x-markas.button>
</div>
</x-markas.stars-background>Examples
Event countdown
Product launch goes live in
- Days
- 02
- Hours
- 14
- Minutes
- 36
Product launch goes live in
- Days
- 02
- Hours
- 14
- Minutes
- 36
Product launch goes live in
- Days
- 02
- Hours
- 14
- Minutes
- 36
Product launch goes live in
- Days
- 02
- Hours
- 14
- Minutes
- 36
Product launch goes live in
- Days
- 02
- Hours
- 14
- Minutes
- 36
Waitlist signup
<x-markas.stars-background :count="150" :seed="3" color="muted" class="rounded-xl border border-line bg-canvas p-6">
<form class="grid gap-4">
<div class="grid gap-1.5"><svg class="mb-2 size-8" viewBox="0 0 1464 1430" aria-hidden="true"><polygon points="354,578 1256,138 1171,430 268,868" class="fill-ink/15" /><polygon points="553,443 1455,3 1370,295 467,733" class="fill-ink/55" /><polygon points="421,762 1325,318 1240,611 336,1050" class="fill-success/35" /><polygon points="265,1073 1169,629 1084,922 180,1362" class="fill-ink/25" /><polygon points="93,965 997,521 912,814 8,1253" class="fill-ink/75" /><polygon points="347,1135 1251,691 1166,984 262,1424" class="fill-success" /></svg>
<h3 class="text-lg font-semibold text-ink">Join the waitlist</h3>
<p class="text-sm text-muted">Be first to try MarkasUI Pro when invites open this spring.</p>
</div>
<div class="flex items-end gap-2">
<x-markas.input label="Email" type="email" placeholder="you@company.com" class="flex-1" />
<x-markas.button type="submit">Request invite</x-markas.button>
</div>
</form>
</x-markas.stars-background>Always-dark section
Built for night owls
This section stays dark in every theme. Add the dark class to the component to keep it that way.
Built for night owls
This section stays dark in every theme. Add the dark class to the component to keep it that way.
Built for night owls
This section stays dark in every theme. Add the dark class to the component to keep it that way.
Built for night owls
This section stays dark in every theme. Add the dark class to the component to keep it that way.
Built for night owls
This section stays dark in every theme. Add the dark class to the component to keep it that way.
<x-markas.stars-background :count="140" :seed="42" class="dark rounded-xl bg-canvas px-6 py-10 text-ink">
<div class="grid gap-4">
<h3 class="text-xl font-semibold text-ink">Built for night owls</h3>
<p class="text-sm text-muted">This section stays dark in every theme. Add the dark class to the component to keep it that way.</p>
<div class="flex gap-2">
<x-markas.button>Start building</x-markas.button>
<x-markas.button variant="ghost">Read the guide</x-markas.button>
</div>
</div>
</x-markas.stars-background>Installation
npx markasui@latest add stars-backgroundpnpm dlx markasui@latest add stars-backgroundyarn dlx markasui@latest add stars-backgroundbunx --bun markasui@latest add stars-background- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
resources/views/components/markas/stars-background.blade.php.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/StarsBackground.tsx.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/StarsBackground.vue.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/lib/components/markas/StarsBackground.svelte.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/StarsBackground.astro.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/app/markas/stars-background.component.ts.
Usage
<x-markas.stars-background :count="120" :seed="7" class="rounded-xl border border-line bg-surface px-6 py-12">
<h2 class="text-2xl font-semibold text-ink">Deploys that ship while you sleep</h2>
<x-markas.button>Get started</x-markas.button>
</x-markas.stars-background>No JavaScript or Alpine.js needed.
import { Button } from "@/components/markas/Button";
import { StarsBackground } from "@/components/markas/StarsBackground";
<StarsBackground
count={120}
seed={7}
className="rounded-xl border border-line bg-surface px-6 py-12"
>
<h2 className="text-2xl font-semibold text-ink">
Deploys that ship while you sleep
</h2>
<Button>Get started</Button>
</StarsBackground>;<template>
<StarsBackground
:count="120"
:seed="7"
class="rounded-xl border border-line bg-surface px-6 py-12"
>
<h2 class="text-2xl font-semibold text-ink">
Deploys that ship while you sleep
</h2>
<Button>Get started</Button>
</StarsBackground>
</template><script lang="ts">
import Button from "$lib/components/markas/Button.svelte";
import StarsBackground from "$lib/components/markas/StarsBackground.svelte";
</script>
<StarsBackground
count={120}
seed={7}
class="rounded-xl border border-line bg-surface px-6 py-12"
>
<h2 class="text-2xl font-semibold text-ink">
Deploys that ship while you sleep
</h2>
<Button>Get started</Button>
</StarsBackground>---
import Button from "@/components/markas/Button.astro";
import StarsBackground from "@/components/markas/StarsBackground.astro";
---
<StarsBackground
count={120}
seed={7}
class="rounded-xl border border-line bg-surface px-6 py-12"
>
<h2 class="text-2xl font-semibold text-ink">
Deploys that ship while you sleep
</h2>
<Button>Get started</Button>
</StarsBackground>import { Component } from "@angular/core";
import { Button } from "./markas/button.component";
import { StarsBackground } from "./markas/stars-background.component";
@Component({
selector: "app-launch",
imports: [Button, StarsBackground],
template: `
<div
markas-stars-background
count="120"
seed="7"
class="rounded-xl border border-line bg-surface px-6 py-12"
>
<h2 class="text-2xl font-semibold text-ink">
Deploys that ship while you sleep
</h2>
<button markas-button>Get started</button>
</div>
`,
})
export class Launch {}Angular uses an attribute selector on the native div, so class, aria-*, and other attributes stay on the root element.
- Star positions come from
seedwith integer math, so all six frameworks render the same sky on the server and client. - Add the
darkclass to keep a section dark in every theme. With reduced motion the stars stop twinkling. - The component has no built-in text, so there are no label props to translate.
Props
| Name | Type | Default | Description |
|---|---|---|---|
count | number | 80 | Number of stars, up to 400. More stars make a denser sky. |
seed | number | 7 | Whole number that decides star positions. The same seed always gives the same sky. |
color | muted | primary | success | warning | danger | primary | Token color of the stars. |
children / slot | slot / ReactNode | - | Content shown on top of the stars. |
Accessibility
- The star layer is aria-hidden and ignores pointer events.
- With reduced motion, stars stop twinkling and keep their own brightness.
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.
- Dot PatternA grid of small dots behind your content, with an optional radial or linear fade. Pure CSS, no JavaScript.
- Gradient BorderWraps a card, button, or field in a moving gradient border that spins, shines, or pulses, with an optional soft glow.