Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Spotlight Beam

    A large, tilted beam of light that sweeps in once when the section scrolls into view, and can lean toward the pointer.

    Your roadmap, in the spotlight

    Share what is shipping next with a public roadmap your customers can vote on.

    Your roadmap, in the spotlight

    Share what is shipping next with a public roadmap your customers can vote on.

    Your roadmap, in the spotlight

    Share what is shipping next with a public roadmap your customers can vote on.

    Your roadmap, in the spotlight

    Share what is shipping next with a public roadmap your customers can vote on.

    Your roadmap, in the spotlight

    Share what is shipping next with a public roadmap your customers can vote on.

    <x-markas.spotlight-beam follow class="dark rounded-xl bg-canvas px-6 py-16 text-ink">
        <div class="grid gap-4">
            <h2 class="text-3xl font-semibold tracking-tight text-balance text-ink">Your roadmap, in the spotlight</h2>
            <p class="max-w-80 text-sm text-muted">Share what is shipping next with a public roadmap your customers can vote on.</p>
            <div class="flex gap-2">
                <x-markas.button>Create a roadmap</x-markas.button>
                <x-markas.button variant="ghost">View example</x-markas.button>
            </div>
        </div>
    </x-markas.spotlight-beam>
    import { Button } from "@/components/markas/Button";
    import { SpotlightBeam } from "@/components/markas/SpotlightBeam";
    
    export default function SpotlightBeamExample() {
      return (
        <SpotlightBeam
          follow
          className="dark rounded-xl bg-canvas px-6 py-16 text-ink"
        >
          <div className="grid gap-4">
            <h2 className="text-3xl font-semibold tracking-tight text-balance text-ink">
              Your roadmap, in the spotlight
            </h2>
            <p className="max-w-80 text-sm text-muted">
              Share what is shipping next with a public roadmap your customers can
              vote on.
            </p>
            <div className="flex gap-2">
              <Button>Create a roadmap</Button>
              <Button variant="ghost">View example</Button>
            </div>
          </div>
        </SpotlightBeam>
      );
    }
    <script setup lang="ts">
    import Button from "@/components/markas/Button.vue";
    import SpotlightBeam from "@/components/markas/SpotlightBeam.vue";
    </script>
    
    <template>
      <SpotlightBeam follow class="dark rounded-xl bg-canvas px-6 py-16 text-ink">
        <div class="grid gap-4">
          <h2 class="text-3xl font-semibold tracking-tight text-balance text-ink">
            Your roadmap, in the spotlight
          </h2>
          <p class="max-w-80 text-sm text-muted">
            Share what is shipping next with a public roadmap your customers can
            vote on.
          </p>
          <div class="flex gap-2">
            <Button>Create a roadmap</Button>
            <Button variant="ghost">View example</Button>
          </div>
        </div>
      </SpotlightBeam>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import SpotlightBeam from "$lib/components/markas/SpotlightBeam.svelte";
    </script>
    
    <SpotlightBeam follow class="dark rounded-xl bg-canvas px-6 py-16 text-ink">
      <div class="grid gap-4">
        <h2 class="text-3xl font-semibold tracking-tight text-balance text-ink">
          Your roadmap, in the spotlight
        </h2>
        <p class="max-w-80 text-sm text-muted">
          Share what is shipping next with a public roadmap your customers can vote
          on.
        </p>
        <div class="flex gap-2">
          <Button>Create a roadmap</Button>
          <Button variant="ghost">View example</Button>
        </div>
      </div>
    </SpotlightBeam>
    ---
    import Button from "@/components/markas/Button.astro";
    import SpotlightBeam from "@/components/markas/SpotlightBeam.astro";
    ---
    
    <SpotlightBeam
      follow
      class="dark rounded-xl bg-canvas px-6 py-16 text-ink"
    >
      <div class="grid gap-4">
        <h2 class="text-3xl font-semibold tracking-tight text-balance text-ink">
          Your roadmap, in the spotlight
        </h2>
        <p class="max-w-80 text-sm text-muted">
          Share what is shipping next with a public roadmap your customers can
          vote on.
        </p>
        <div class="flex gap-2">
          <Button>Create a roadmap</Button>
          <Button variant="ghost">View example</Button>
        </div>
      </div>
    </SpotlightBeam>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { SpotlightBeam } from "./markas/spotlight-beam.component";
    
    @Component({
      selector: "markas-example",
      imports: [Button, SpotlightBeam],
      template: `
        <div
          markas-spotlight-beam
          follow
          class="dark rounded-xl bg-canvas px-6 py-16 text-ink"
        >
          <div class="grid gap-4">
            <h2 class="text-3xl font-semibold tracking-tight text-balance text-ink">
              Your roadmap, in the spotlight
            </h2>
            <p class="max-w-80 text-sm text-muted">
              Share what is shipping next with a public roadmap your customers can
              vote on.
            </p>
            <div class="flex gap-2">
              <button markas-button>Create a roadmap</button>
              <button markas-button variant="ghost">View example</button>
            </div>
          </div>
        </div>
      `,
    })
    export default class SpotlightBeamExample {}

    Examples

    Sign-in screen

    Welcome back

    Sign in to your team workspace.

    Welcome back

    Sign in to your team workspace.

    Welcome back

    Sign in to your team workspace.

    Welcome back

    Sign in to your team workspace.

    Welcome back

    Sign in to your team workspace.

    Feature section

    New in 4.2

    Offline mode that just works

    Keep editing on a plane or a train. Changes sync the moment you are back online.

    New in 4.2

    Offline mode that just works

    Keep editing on a plane or a train. Changes sync the moment you are back online.

    New in 4.2

    Offline mode that just works

    Keep editing on a plane or a train. Changes sync the moment you are back online.

    New in 4.2

    Offline mode that just works

    Keep editing on a plane or a train. Changes sync the moment you are back online.

    New in 4.2

    Offline mode that just works

    Keep editing on a plane or a train. Changes sync the moment you are back online.

    Call to action

    Ready to go live tonight?

    Deploy in one click. Roll back just as fast.

    Ready to go live tonight?

    Deploy in one click. Roll back just as fast.

    Ready to go live tonight?

    Deploy in one click. Roll back just as fast.

    Ready to go live tonight?

    Deploy in one click. Roll back just as fast.

    Ready to go live tonight?

    Deploy in one click. Roll back just as fast.

    Installation

    npx markasui@latest add spotlight-beam

    Usage

    <x-markas.spotlight-beam follow class="dark rounded-xl bg-canvas px-6 py-16 text-ink">
        <h2 class="text-3xl font-semibold text-ink">Your roadmap, in the spotlight</h2>
        <x-markas.button>Create a roadmap</x-markas.button>
    </x-markas.spotlight-beam>

    Needs Alpine.js for the entrance and for follow.

    import { Button } from "@/components/markas/Button";
    import { SpotlightBeam } from "@/components/markas/SpotlightBeam";
    
    <SpotlightBeam follow className="dark rounded-xl bg-canvas px-6 py-16 text-ink">
      <h2 className="text-3xl font-semibold text-ink">
        Your roadmap, in the spotlight
      </h2>
      <Button>Create a roadmap</Button>
    </SpotlightBeam>;
    <template>
      <SpotlightBeam follow class="dark rounded-xl bg-canvas px-6 py-16 text-ink">
        <h2 class="text-3xl font-semibold text-ink">
          Your roadmap, in the spotlight
        </h2>
        <Button>Create a roadmap</Button>
      </SpotlightBeam>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import SpotlightBeam from "$lib/components/markas/SpotlightBeam.svelte";
    </script>
    
    <SpotlightBeam follow class="dark rounded-xl bg-canvas px-6 py-16 text-ink">
      <h2 class="text-3xl font-semibold text-ink">
        Your roadmap, in the spotlight
      </h2>
      <Button>Create a roadmap</Button>
    </SpotlightBeam>
    ---
    import Button from "@/components/markas/Button.astro";
    import SpotlightBeam from "@/components/markas/SpotlightBeam.astro";
    ---
    
    <SpotlightBeam follow class="dark rounded-xl bg-canvas px-6 py-16 text-ink">
      <h2 class="text-3xl font-semibold text-ink">
        Your roadmap, in the spotlight
      </h2>
      <Button>Create a roadmap</Button>
    </SpotlightBeam>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { SpotlightBeam } from "./markas/spotlight-beam.component";
    
    @Component({
      selector: "app-roadmap",
      imports: [Button, SpotlightBeam],
      template: `
        <div
          markas-spotlight-beam
          follow
          class="dark rounded-xl bg-canvas px-6 py-16 text-ink"
        >
          <h2 class="text-3xl font-semibold text-ink">
            Your roadmap, in the spotlight
          </h2>
          <button markas-button>Create a roadmap</button>
        </div>
      `,
    })
    export class Roadmap {}

    Angular uses an attribute selector on the native div, so class, aria-*, and other attributes stay on the root element.

    • The beam is three stretched radial gradients, rotated from the light source. No SVG filters or blur, so it stays cheap to paint.
    • variant="top-right" mirrors the beam, variant="center" shines straight down.
    • follow stores the pointer position in CSS variables on the root; the light shifts by at most 4% and eases back into place.
    • The entrance plays once when the section first scrolls into view. With reduced motion the beam is shown right away and follow is off.
    • The component has no built-in text, so there are no label props to translate.

    Props

    NameTypeDefaultDescription
    varianttop-left | top-right | centertop-leftWhere the light comes from: a top corner shining diagonally, or straight down from the top center.
    colorprimary | success | warning | danger | mutedprimaryToken used for the beam.
    intensitysoft | medium | strongmediumHow bright the beam is.
    speedslow | normal | fastnormalLength of the entrance: 2.4s, 1.6s, or 0.9s.
    followbooleanfalseThe light source leans a little toward the pointer while it moves over the section.
    children / slotslot / ReactNode-Content shown on top of the beam.

    Accessibility

    • The beam layer is aria-hidden and ignores pointer events.
    • The entrance plays once, the first time the section scrolls into view.
    • With reduced motion, the beam shows in place right away and does not follow the pointer.

    Related components

    More backgrounds components with the same classes in every framework.