SVG lines that draw in and fade out one after another, as waves, rays from a point, or a lattice. Made for hero sections.
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>Examples
404 page with rays
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.
Sign-in lattice
Trial CTA card
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.
Installation
npx markasui@latest add background-linespnpm dlx markasui@latest add background-linesyarn dlx markasui@latest add background-linesbunx --bun markasui@latest add background-lines- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
resources/views/components/markas/background-lines.blade.php.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/BackgroundLines.tsx.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/BackgroundLines.vue.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/lib/components/markas/BackgroundLines.svelte.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/BackgroundLines.astro.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/app/markas/background-lines.component.ts.
Usage
<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">Ideas in motion</h2>
</x-markas.background-lines>No JavaScript or Alpine.js needed.
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">Ideas in motion</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">Ideas in motion</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">Ideas in motion</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">Ideas in motion</h2>
</BackgroundLines>No client-side JavaScript; the markup is rendered on the 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">Ideas in motion</h2>
</div>
`,
})
export class Hero {}The component is an attribute on a div, so class, style, and other attributes stay on the root element.
- Each line draws in, holds, and fades out, offset from its neighbours so the picture never empties.
raysfans out from the top center: add top padding so the light source sits above the headline.- The lines scale with the area (the 800x400 drawing covers it like
object-fit: cover). - The component has no built-in text, so there are no label props to translate.
Props
| Name | Type | Default | Description |
|---|---|---|---|
variant | waves | rays | lattice | waves | waves stacks gentle curves, rays fans lines out from the top center, lattice crosses diagonal lines. |
count | number | 12 | Number of lines, up to 24. |
speed | slow | normal | fast | normal | Length of one draw and fade cycle: 12s, 8s, or 5s. |
color | muted | primary | success | warning | danger | primary | Token color of the lines. |
children / slot | slot / ReactNode / snippet | - | Content shown on top of the lines. |
Accessibility
- The line layer is aria-hidden and ignores pointer events.
- With reduced motion, every line is shown fully drawn and still.
- Line positions come from a formula, so the server and client render the same markup.
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.
- 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.
- Grid PatternThin grid lines behind your content, with highlighted cells that pulse softly and an optional fade.