Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Spotlight Beam

    Berkas cahaya besar dan miring yang masuk sekali saat section masuk layar, dan bisa condong ke arah 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 {}

    Contoh

    Layar masuk

    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.

    Section fitur

    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.

    Ajakan bertindak

    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.

    Instalasi

    npx markasui@latest add spotlight-beam

    Pemakaian

    <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">Roadmap kamu, di bawah sorotan</h2>
        <x-markas.button>Buat roadmap</x-markas.button>
    </x-markas.spotlight-beam>

    Butuh Alpine.js untuk animasi masuk dan 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">
        Roadmap kamu, di bawah sorotan
      </h2>
      <Button>Buat 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">
          Roadmap kamu, di bawah sorotan
        </h2>
        <Button>Buat 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 memakai attribute selector pada div native, jadi class, aria-*, dan atribut lain tetap di elemen akar.

    • Berkas cahaya terdiri dari tiga gradien radial yang direntangkan dan diputar dari sumber cahaya. Tanpa filter SVG atau blur, jadi ringan dilukis.
    • variant="top-right" mencerminkan berkas, variant="center" menyorot lurus ke bawah.
    • follow menyimpan posisi pointer di variabel CSS pada root; cahaya bergeser paling jauh 4% lalu kembali pelan.
    • Animasi masuk diputar sekali saat section pertama kali masuk layar. Dengan reduced motion berkas langsung tampil dan follow mati.
    • Komponen ini tidak punya teks bawaan, jadi tidak ada prop label yang perlu diterjemahkan.

    Props

    NamaTipeDefaultKeterangan
    varianttop-left | top-right | centertop-leftAsal cahaya: sudut atas yang menyorot miring, atau lurus ke bawah dari tengah atas.
    colorprimary | success | warning | danger | mutedprimaryToken untuk berkas cahaya.
    intensitysoft | medium | strongmediumSeberapa terang berkas cahaya.
    speedslow | normal | fastnormalLama animasi masuk: 2.4s, 1.6s, atau 0.9s.
    followbooleanfalseSumber cahaya sedikit condong ke arah pointer saat bergerak di atas section.
    children / slotslot / ReactNode-Konten yang tampil di atas berkas cahaya.

    Aksesibilitas

    • Lapisan cahaya memakai aria-hidden dan mengabaikan pointer.
    • Animasi masuk diputar sekali, saat section pertama kali masuk layar.
    • Dengan reduced motion, berkas cahaya langsung tampil di tempatnya dan tidak mengikuti pointer.

    Komponen terkait

    Komponen latar lain dengan class yang sama di setiap framework.