Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Spotlight Card

    Card with a soft radial light that follows the pointer and a border that glows near it. Lights up on keyboard focus too.

    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 {}

    Examples

    Pricing card

    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

    Feature grid

    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.

    Status colors

    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

    Installation

    npx markasui@latest add spotlight-card

    Usage

    <x-markas.spotlight-card>
        <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>
    </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">Instant previews</h3>
        <p className="text-sm text-muted">Every pull request gets its own link.</p>
      </div>
    </SpotlightCard>
    
    <SpotlightCard color="success">...</SpotlightCard>
    <template>
      <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>
    
      <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 {}
    • The pointer position is stored in the --spot-x and --spot-y custom properties; the light and border are CSS radial gradients.
    • Focus inside the card shows the glow at the center, so keyboard users get the same feedback. The Blade version needs Alpine.js.
    • Class and attributes go to the outer element. Add padding inside the content.

    Props

    NameTypeDefaultDescription
    color'primary' | 'success' | 'warning' | 'danger'primaryColor of the light and the glowing border.
    children / slotReactNode / slot-Card content. Add your own padding, such as p-6.

    Accessibility

    • The light and the glowing border are aria-hidden layers that never catch the pointer.
    • When focus moves inside the card, the glow appears centered, so keyboard users see the same effect.
    • With reduced motion, the glow appears without a fade.

    Related components

    More animations components with the same classes in every framework.