Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Spotlight Card

    Kartu dengan sorotan radial lembut yang mengikuti kursor dan border yang menyala di dekatnya. Ikut menyala saat fokus keyboard.

    Instant previews

    Every pull request gets its own preview link, ready before the review starts.

    Instant previews

    Every pull request gets its own preview link, ready before the review starts.

    Instant previews

    Every pull request gets its own preview link, ready before the review starts.

    Instant previews

    Every pull request gets its own preview link, ready before the review starts.

    Instant previews

    Every pull request gets its own preview link, ready before the review starts.

    <x-markas.spotlight-card>
        <div class="p-6">
            <span class="flex size-10 items-center justify-center rounded-lg bg-subtle text-ink">
                <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="M13 3 4 14h7l-1 7 9-11h-7l1-7Z" /></svg>
            </span>
            <h3 class="mt-4 text-base font-semibold text-ink">Instant previews</h3>
            <p class="mt-1 text-sm text-muted">
                Every pull request gets its own preview link, ready before the review starts.
            </p>
        </div>
    </x-markas.spotlight-card>
    import { SpotlightCard } from "@/components/markas/SpotlightCard";
    
    export default function SpotlightCardExample() {
      return (
        <SpotlightCard>
          <div className="p-6">
            <span className="flex size-10 items-center justify-center rounded-lg bg-subtle text-ink">
              <svg
                className="size-5"
                viewBox="0 0 24 24"
                fill="none"
                stroke="currentColor"
                strokeWidth="1.5"
                strokeLinecap="round"
                strokeLinejoin="round"
                aria-hidden="true"
              >
                <path d="M13 3 4 14h7l-1 7 9-11h-7l1-7Z" />
              </svg>
            </span>
            <h3 className="mt-4 text-base font-semibold text-ink">
              Instant previews
            </h3>
            <p className="mt-1 text-sm text-muted">
              Every pull request gets its own preview link, ready before the review
              starts.
            </p>
          </div>
        </SpotlightCard>
      );
    }
    <script setup lang="ts">
    import SpotlightCard from "@/components/markas/SpotlightCard.vue";
    </script>
    
    <template>
      <SpotlightCard>
        <div class="p-6">
          <span
            class="flex size-10 items-center justify-center rounded-lg bg-subtle text-ink"
          >
            <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="M13 3 4 14h7l-1 7 9-11h-7l1-7Z" />
            </svg>
          </span>
          <h3 class="mt-4 text-base font-semibold text-ink">Instant previews</h3>
          <p class="mt-1 text-sm text-muted">
            Every pull request gets its own preview link, ready before the review
            starts.
          </p>
        </div>
      </SpotlightCard>
    </template>
    <script lang="ts">
      import SpotlightCard from "$lib/components/markas/SpotlightCard.svelte";
    </script>
    
    <SpotlightCard>
      <div class="p-6">
        <span
          class="flex size-10 items-center justify-center rounded-lg bg-subtle text-ink"
        >
          <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="M13 3 4 14h7l-1 7 9-11h-7l1-7Z" />
          </svg>
        </span>
        <h3 class="mt-4 text-base font-semibold text-ink">Instant previews</h3>
        <p class="mt-1 text-sm text-muted">
          Every pull request gets its own preview link, ready before the review
          starts.
        </p>
      </div>
    </SpotlightCard>
    ---
    import SpotlightCard from "@/components/markas/SpotlightCard.astro";
    ---
    
    <SpotlightCard>
      <div class="p-6">
        <span
          class="flex size-10 items-center justify-center rounded-lg bg-subtle text-ink"
        >
          <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="M13 3 4 14h7l-1 7 9-11h-7l1-7Z" ></path>
          </svg>
        </span>
        <h3 class="mt-4 text-base font-semibold text-ink">Instant previews</h3>
        <p class="mt-1 text-sm text-muted">
          Every pull request gets its own preview link, ready before the review
          starts.
        </p>
      </div>
    </SpotlightCard>
    import { Component } from "@angular/core";
    import { SpotlightCard } from "./markas/spotlight-card.component";
    
    @Component({
      selector: "markas-example",
      imports: [SpotlightCard],
      template: `
        <div markas-spotlight-card>
          <div class="p-6">
            <span
              class="flex size-10 items-center justify-center rounded-lg bg-subtle text-ink"
            >
              <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="M13 3 4 14h7l-1 7 9-11h-7l1-7Z" />
              </svg>
            </span>
            <h3 class="mt-4 text-base font-semibold text-ink">Instant previews</h3>
            <p class="mt-1 text-sm text-muted">
              Every pull request gets its own preview link, ready before the review
              starts.
            </p>
          </div>
        </div>
      `,
    })
    export default class SpotlightCardExample {}

    Contoh

    Kartu harga

    Pro

    $24 per month

    • Unlimited projects
    • Preview links
    • Priority support

    Pro

    $24 per month

    • Unlimited projects
    • Preview links
    • Priority support

    Pro

    $24 per month

    • Unlimited projects
    • Preview links
    • Priority support

    Pro

    $24 per month

    • Unlimited projects
    • Preview links
    • Priority support

    Pro

    $24 per month

    • Unlimited projects
    • Preview links
    • Priority support

    Grid fitur

    Same classes

    Blade, React, and Vue share one markup.

    Dark mode

    Tokens switch with a single class.

    Accessible

    Checked with axe and the keyboard.

    Zero runtime

    Copy the file, keep the code.

    Same classes

    Blade, React, and Vue share one markup.

    Dark mode

    Tokens switch with a single class.

    Accessible

    Checked with axe and the keyboard.

    Zero runtime

    Copy the file, keep the code.

    Same classes

    Blade, React, and Vue share one markup.

    Dark mode

    Tokens switch with a single class.

    Accessible

    Checked with axe and the keyboard.

    Zero runtime

    Copy the file, keep the code.

    Same classes

    Blade, React, and Vue share one markup.

    Dark mode

    Tokens switch with a single class.

    Accessible

    Checked with axe and the keyboard.

    Zero runtime

    Copy the file, keep the code.

    Same classes

    Blade, React, and Vue share one markup.

    Dark mode

    Tokens switch with a single class.

    Accessible

    Checked with axe and the keyboard.

    Zero runtime

    Copy the file, keep the code.

    Warna status

    API

    Operational, 99.98% uptime

    Webhooks

    Delayed, fix in progress

    API

    Operational, 99.98% uptime

    Webhooks

    Delayed, fix in progress

    API

    Operational, 99.98% uptime

    Webhooks

    Delayed, fix in progress

    API

    Operational, 99.98% uptime

    Webhooks

    Delayed, fix in progress

    API

    Operational, 99.98% uptime

    Webhooks

    Delayed, fix in progress

    Instalasi

    npx markasui@latest add spotlight-card

    Pemakaian

    <x-markas.spotlight-card>
        <div class="p-6">
            <h3 class="font-semibold">Pratinjau instan</h3>
            <p class="text-sm text-muted">Setiap pull request punya tautannya sendiri.</p>
        </div>
    </x-markas.spotlight-card>
    
    <x-markas.spotlight-card color="success">...</x-markas.spotlight-card>
    import { SpotlightCard } from "@/components/markas/SpotlightCard";
    
    <SpotlightCard>
      <div className="p-6">
        <h3 className="font-semibold">Pratinjau instan</h3>
        <p className="text-sm text-muted">Setiap pull request punya tautannya sendiri.</p>
      </div>
    </SpotlightCard>
    
    <SpotlightCard color="success">...</SpotlightCard>
    <template>
      <SpotlightCard>
        <div class="p-6">
          <h3 class="font-semibold">Pratinjau instan</h3>
          <p class="text-sm text-muted">
            Setiap pull request punya tautannya sendiri.
          </p>
        </div>
      </SpotlightCard>
    
      <SpotlightCard color="success">...</SpotlightCard>
    </template>
    <script lang="ts">
      import SpotlightCard from "$lib/components/markas/SpotlightCard.svelte";
    </script>
    
    <SpotlightCard>
      <div class="p-6">
        <h3 class="font-semibold">Instant previews</h3>
        <p class="text-sm text-muted">Every pull request gets its own link.</p>
      </div>
    </SpotlightCard>
    ---
    import SpotlightCard from "@/components/markas/SpotlightCard.astro";
    ---
    
    <SpotlightCard color="success">
      <div class="p-6">
        <h3 class="font-semibold">Instant previews</h3>
        <p class="text-sm text-muted">Every pull request gets its own link.</p>
      </div>
    </SpotlightCard>
    import { Component } from "@angular/core";
    import { SpotlightCard } from "./markas/spotlight-card.component";
    
    @Component({
      selector: "app-feature",
      imports: [SpotlightCard],
      template: `
        <div markas-spotlight-card color="success">
          <div class="p-6">
            <h3 class="font-semibold">Instant previews</h3>
            <p class="text-sm text-muted">Every pull request gets its own link.</p>
          </div>
        </div>
      `,
    })
    export class Feature {}
    • Posisi kursor disimpan di custom property --spot-x dan --spot-y; sorotan dan border berupa gradien radial CSS.
    • Fokus di dalam kartu menampilkan cahaya di tengah, jadi pengguna keyboard mendapat umpan balik yang sama. Versi Blade butuh Alpine.js.
    • Class dan atribut jatuh ke elemen luar. Tambahkan padding di dalam isi kartu.

    Props

    NamaTipeDefaultKeterangan
    color'primary' | 'success' | 'warning' | 'danger'primaryWarna sorotan dan border yang menyala.
    children / slotReactNode / slot-Isi kartu. Tambahkan padding sendiri, misalnya p-6.

    Aksesibilitas

    • Sorotan dan border yang menyala adalah lapisan aria-hidden yang tidak pernah menangkap pointer.
    • Saat fokus berpindah ke dalam kartu, cahaya muncul di tengah, jadi pengguna keyboard melihat efek yang sama.
    • Dengan reduced motion, cahaya muncul tanpa transisi pudar.

    Komponen terkait

    Komponen animasi lain dengan class yang sama di setiap framework.