Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Shooting Stars

    Bidang bintang berkelip dengan bintang jatuh yang melesat setiap beberapa detik. Langit malam atau fajar hangat, semua dari warna token.

    Private beta

    Make a wish, then ship it

    Turn a one line idea into a working preview before your coffee gets cold.

    Private beta

    Make a wish, then ship it

    Turn a one line idea into a working preview before your coffee gets cold.

    Private beta

    Make a wish, then ship it

    Turn a one line idea into a working preview before your coffee gets cold.

    Private beta

    Make a wish, then ship it

    Turn a one line idea into a working preview before your coffee gets cold.

    Private beta

    Make a wish, then ship it

    Turn a one line idea into a working preview before your coffee gets cold.

    <x-markas.shooting-stars class="rounded-xl border border-line bg-surface px-6 py-14">
        <div class="grid justify-items-center gap-4 text-center">
            <p class="text-sm font-medium text-muted">Private beta</p>
            <h2 class="text-2xl font-semibold text-balance text-ink">Make a wish, then ship it</h2>
            <p class="max-w-80 text-sm text-muted">Turn a one line idea into a working preview before your coffee gets cold.</p>
            <x-markas.button>Join the waitlist</x-markas.button>
        </div>
    </x-markas.shooting-stars>
    import { Button } from "@/components/markas/Button";
    import { ShootingStars } from "@/components/markas/ShootingStars";
    
    export default function ShootingStarsExample() {
      return (
        <ShootingStars className="rounded-xl border border-line bg-surface px-6 py-14">
          <div className="grid justify-items-center gap-4 text-center">
            <p className="text-sm font-medium text-muted">Private beta</p>
            <h2 className="text-2xl font-semibold text-balance text-ink">
              Make a wish, then ship it
            </h2>
            <p className="max-w-80 text-sm text-muted">
              Turn a one line idea into a working preview before your coffee gets
              cold.
            </p>
            <Button>Join the waitlist</Button>
          </div>
        </ShootingStars>
      );
    }
    <script setup lang="ts">
    import Button from "@/components/markas/Button.vue";
    import ShootingStars from "@/components/markas/ShootingStars.vue";
    </script>
    
    <template>
      <ShootingStars class="rounded-xl border border-line bg-surface px-6 py-14">
        <div class="grid justify-items-center gap-4 text-center">
          <p class="text-sm font-medium text-muted">Private beta</p>
          <h2 class="text-2xl font-semibold text-balance text-ink">
            Make a wish, then ship it
          </h2>
          <p class="max-w-80 text-sm text-muted">
            Turn a one line idea into a working preview before your coffee gets
            cold.
          </p>
          <Button>Join the waitlist</Button>
        </div>
      </ShootingStars>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import ShootingStars from "$lib/components/markas/ShootingStars.svelte";
    </script>
    
    <ShootingStars class="rounded-xl border border-line bg-surface px-6 py-14">
      <div class="grid justify-items-center gap-4 text-center">
        <p class="text-sm font-medium text-muted">Private beta</p>
        <h2 class="text-2xl font-semibold text-balance text-ink">
          Make a wish, then ship it
        </h2>
        <p class="max-w-80 text-sm text-muted">
          Turn a one line idea into a working preview before your coffee gets cold.
        </p>
        <Button>Join the waitlist</Button>
      </div>
    </ShootingStars>
    ---
    import Button from "@/components/markas/Button.astro";
    import ShootingStars from "@/components/markas/ShootingStars.astro";
    ---
    
    <ShootingStars class="rounded-xl border border-line bg-surface px-6 py-14">
      <div class="grid justify-items-center gap-4 text-center">
        <p class="text-sm font-medium text-muted">Private beta</p>
        <h2 class="text-2xl font-semibold text-balance text-ink">
          Make a wish, then ship it
        </h2>
        <p class="max-w-80 text-sm text-muted">
          Turn a one line idea into a working preview before your coffee gets
          cold.
        </p>
        <Button>Join the waitlist</Button>
      </div>
    </ShootingStars>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { ShootingStars } from "./markas/shooting-stars.component";
    
    @Component({
      selector: "markas-example",
      imports: [Button, ShootingStars],
      template: `
        <div
          markas-shooting-stars
          class="rounded-xl border border-line bg-surface px-6 py-14"
        >
          <div class="grid justify-items-center gap-4 text-center">
            <p class="text-sm font-medium text-muted">Private beta</p>
            <h2 class="text-2xl font-semibold text-balance text-ink">
              Make a wish, then ship it
            </h2>
            <p class="max-w-80 text-sm text-muted">
              Turn a one line idea into a working preview before your coffee gets
              cold.
            </p>
            <button markas-button>Join the waitlist</button>
          </div>
        </div>
      `,
    })
    export default class ShootingStarsExample {}

    Contoh

    Waitlist fajar

    Early access opens at sunrise

    We invite a new group every morning. Leave your email and we will save you a seat.

    Early access opens at sunrise

    We invite a new group every morning. Leave your email and we will save you a seat.

    Early access opens at sunrise

    We invite a new group every morning. Leave your email and we will save you a seat.

    Early access opens at sunrise

    We invite a new group every morning. Leave your email and we will save you a seat.

    Early access opens at sunrise

    We invite a new group every morning. Leave your email and we will save you a seat.

    Halaman masuk malam

    Night shift login

    On call this week? Sign in to see open incidents.

    Night shift login

    On call this week? Sign in to see open incidents.

    Night shift login

    On call this week? Sign in to see open incidents.

    Night shift login

    On call this week? Sign in to see open incidents.

    Night shift login

    On call this week? Sign in to see open incidents.

    Pengumuman acara

    Live, 14 November, 06:00 UTC

    Sunrise Summit: watch the keynote as it lands

    Four talks, one hour, and a few surprises we have kept quiet all year.

    Live, 14 November, 06:00 UTC

    Sunrise Summit: watch the keynote as it lands

    Four talks, one hour, and a few surprises we have kept quiet all year.

    Live, 14 November, 06:00 UTC

    Sunrise Summit: watch the keynote as it lands

    Four talks, one hour, and a few surprises we have kept quiet all year.

    Live, 14 November, 06:00 UTC

    Sunrise Summit: watch the keynote as it lands

    Four talks, one hour, and a few surprises we have kept quiet all year.

    Live, 14 November, 06:00 UTC

    Sunrise Summit: watch the keynote as it lands

    Four talks, one hour, and a few surprises we have kept quiet all year.

    Instalasi

    npx markasui@latest add shooting-stars

    Pemakaian

    <x-markas.shooting-stars variant="night" frequency="normal" trail-color="primary" class="dark rounded-xl bg-canvas px-6 py-14">
        <h2 class="text-2xl font-semibold text-ink">Buat permintaan, lalu rilis</h2>
        <x-markas.button>Gabung waitlist</x-markas.button>
    </x-markas.shooting-stars>

    Tidak butuh JavaScript atau Alpine.js.

    import { Button } from "@/components/markas/Button";
    import { ShootingStars } from "@/components/markas/ShootingStars";
    
    <ShootingStars
      variant="night"
      frequency="normal"
      trailColor="primary"
      className="dark rounded-xl bg-canvas px-6 py-14"
    >
      <h2 className="text-2xl font-semibold text-ink">
        Buat permintaan, lalu rilis
      </h2>
      <Button>Gabung waitlist</Button>
    </ShootingStars>;
    <template>
      <ShootingStars
        variant="night"
        frequency="normal"
        trail-color="primary"
        class="dark rounded-xl bg-canvas px-6 py-14"
      >
        <h2 class="text-2xl font-semibold text-ink">Buat permintaan, lalu rilis</h2>
        <Button>Gabung waitlist</Button>
      </ShootingStars>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import ShootingStars from "$lib/components/markas/ShootingStars.svelte";
    </script>
    
    <ShootingStars
      variant="night"
      frequency="normal"
      trailColor="primary"
      class="dark rounded-xl bg-canvas px-6 py-14"
    >
      <h2 class="text-2xl font-semibold text-ink">Make a wish, then ship it</h2>
      <Button>Join the waitlist</Button>
    </ShootingStars>
    ---
    import Button from "@/components/markas/Button.astro";
    import ShootingStars from "@/components/markas/ShootingStars.astro";
    ---
    
    <ShootingStars
      variant="night"
      frequency="normal"
      trailColor="primary"
      class="dark rounded-xl bg-canvas px-6 py-14"
    >
      <h2 class="text-2xl font-semibold text-ink">Make a wish, then ship it</h2>
      <Button>Join the waitlist</Button>
    </ShootingStars>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { ShootingStars } from "./markas/shooting-stars.component";
    
    @Component({
      selector: "app-waitlist",
      imports: [Button, ShootingStars],
      template: `
        <div
          markas-shooting-stars
          variant="night"
          frequency="normal"
          trailColor="primary"
          class="dark rounded-xl bg-canvas px-6 py-14"
        >
          <h2 class="text-2xl font-semibold text-ink">Make a wish, then ship it</h2>
          <button markas-button>Join the waitlist</button>
        </div>
      `,
    })
    export class Waitlist {}

    Angular memakai attribute selector pada div native, jadi class, aria-*, dan atribut lain tetap di elemen akar.

    • Tiga bintang jatuh berbagi satu putaran CSS, jadi satu melintas setiap sepertiga putaran. Di sisa putaran mereka tidak terlihat.
    • Posisi bintang dan lintasan dihitung dari seed dengan bilangan bulat, jadi semua framework merender langit yang sama.
    • Komponen ini terpisah dari Stars Background dengan keyframe sendiri, jadi keduanya bisa ada di halaman yang sama.
    • Dengan reduced motion bintang berhenti berkelip dan lintasan diam.
    • Komponen ini tidak punya teks bawaan, jadi tidak ada prop label yang perlu diterjemahkan.

    Props

    NamaTipeDefaultKeterangan
    variantnight | dawnnightnight: bintang di seluruh area. dawn: bintang di langit atas dengan cahaya hangat naik dari bawah.
    frequencylow | normal | highnormalSeberapa sering bintang jatuh muncul: kira-kira tiap 5, 3, atau 1,5 detik.
    trailColormuted | ink | primary | success | warning | dangerprimary (night), warning (dawn)Warna token ekor bintang jatuh. Kepalanya selalu memakai ink.
    starsnumber70Jumlah bintang latar yang berkelip, maksimal 300.
    seednumber11Bilangan bulat yang menentukan posisi bintang dan lintasan. Seed sama selalu menghasilkan langit yang sama.
    children / slotslot / ReactNode-Konten yang tampil di atas langit.

    Aksesibilitas

    • Lapisan langit memakai aria-hidden dan mengabaikan pointer.
    • Dengan reduced motion, bintang berhenti berkelip dan bintang jatuh diam sebagai garis pendek.

    Komponen terkait

    Komponen latar lain dengan class yang sama di setiap framework.