Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Card

    Kartu untuk mengelompokkan konten dengan judul, deskripsi, isi, dan footer opsional.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.
    <x-markas.card title="Pro plan" description="For small teams that are growing.">
        Includes 10 team members, 50 GB of storage, and monthly reports.
    
        <x-slot:footer>
            <x-markas.button size="sm">Choose plan</x-markas.button>
            <x-markas.button variant="ghost" size="sm">Compare</x-markas.button>
        </x-slot:footer>
    </x-markas.card>
    import { Button } from "@/components/markas/Button";
    import { Card } from "@/components/markas/Card";
    
    export default function CardExample() {
      return (
        <Card
          title="Pro plan"
          description="For small teams that are growing."
          footer={
            <>
              <Button size="sm">Choose plan</Button>
              <Button variant="ghost" size="sm">
                Compare
              </Button>
            </>
          }
        >
          Includes 10 team members, 50 GB of storage, and monthly reports.
        </Card>
      );
    }
    <script setup lang="ts">
    import Button from "@/components/markas/Button.vue";
    import Card from "@/components/markas/Card.vue";
    </script>
    
    <template>
      <Card title="Pro plan" description="For small teams that are growing.">
        Includes 10 team members, 50 GB of storage, and monthly reports.
    
        <template #footer>
          <Button size="sm">Choose plan</Button>
          <Button variant="ghost" size="sm">Compare</Button>
        </template>
      </Card>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Card from "$lib/components/markas/Card.svelte";
    </script>
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members, 50 GB of storage, and monthly reports.
    
      {#snippet footer()}
        <Button size="sm">Choose plan</Button>
        <Button variant="ghost" size="sm">Compare</Button>
      {/snippet}
    </Card>
    ---
    import Button from "@/components/markas/Button.astro";
    import Card from "@/components/markas/Card.astro";
    ---
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members, 50 GB of storage, and monthly reports.
    
      <Fragment slot="footer">
        <Button size="sm">Choose plan</Button>
        <Button variant="ghost" size="sm">Compare</Button>
      </Fragment>
    </Card>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { Card } from "./markas/card.component";
    
    @Component({
      selector: "markas-example",
      imports: [Button, Card],
      template: `
        <article
          markas-card
          title="Pro plan"
          description="For small teams that are growing."
        >
          Includes 10 team members, 50 GB of storage, and monthly reports.
          <ng-container footer>
            <button markas-button size="sm">Choose plan</button>
            <button markas-button variant="ghost" size="sm">Compare</button>
          </ng-container>
        </article>
      `,
    })
    export default class CardExample {}

    Contoh

    Statistik

    Total revenue

    $48,250

    +12.5% vs last month

    Active users

    1,284

    -3.2% vs last month

    Total revenue

    $48,250

    +12.5%vs last month

    Active users

    1,284

    -3.2%vs last month

    Total revenue

    $48,250

    +12.5%vs last month

    Active users

    1,284

    -3.2%vs last month

    Total revenue

    $48,250

    +12.5% vs last month

    Active users

    1,284

    -3.2% vs last month

    Total revenue

    $48,250

    +12.5%vs last month

    Active users

    1,284

    -3.2%vs last month

    Produk

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Profil

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Aksi di footer

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Instalasi

    npx markasui@latest add card

    Pemakaian

    <x-markas.card title="Paket Pro" description="Untuk tim kecil yang sedang tumbuh.">
        Termasuk 10 anggota tim dan penyimpanan 50 GB.
    
        <x-slot:footer>
            <x-markas.button size="sm">Pilih paket</x-markas.button>
        </x-slot:footer>
    </x-markas.card>
    import { Button } from "@/components/markas/Button";
    import { Card } from "@/components/markas/Card";
    
    <Card
      title="Paket Pro"
      description="Untuk tim kecil yang sedang tumbuh."
      footer={<Button size="sm">Pilih paket</Button>}
    >
      Termasuk 10 anggota tim dan penyimpanan 50 GB.
    </Card>;
    <template>
      <Card title="Paket Pro" description="Untuk tim kecil yang sedang tumbuh.">
        Termasuk 10 anggota tim dan penyimpanan 50 GB.
    
        <template #footer>
          <Button size="sm">Pilih paket</Button>
        </template>
      </Card>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Card from "$lib/components/markas/Card.svelte";
    </script>
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members and 50 GB of storage.
    
      {#snippet footer()}
        <Button size="sm">Choose plan</Button>
      {/snippet}
    </Card>
    ---
    import Button from "@/components/markas/Button.astro";
    import Card from "@/components/markas/Card.astro";
    ---
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members and 50 GB of storage.
    
      <Button slot="footer" size="sm">Choose plan</Button>
    </Card>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { Card } from "./markas/card.component";
    
    @Component({
      selector: "app-example",
      imports: [Button, Card],
      template: `
        <article
          markas-card
          title="Pro plan"
          description="For small teams that are growing."
        >
          Includes 10 team members and 50 GB of storage.
          <button markas-button footer size="sm">Choose plan</button>
        </article>
      `,
    })
    export class Example {}

    Angular memakai attribute selector pada article native. Elemen dengan atribut footer (bisa ng-container) mengisi footer.

    • Semua bagian opsional. Bagian yang kosong tidak dirender, jadi jarak antar bagian tetap rapi.
    • Class tambahan (misalnya max-w-sm) digabung di akhir dan jatuh ke elemen <article>.
    • Card tidak punya teks bawaan. Semua teks berasal dari prop dan slot, jadi langsung bisa dipakai dalam Bahasa Indonesia.

    Props

    NamaTipeDefaultKeterangan
    titlestring / ReactNode-Judul kartu, dirender sebagai h3.
    descriptionstring / ReactNode-Teks pendek di bawah judul.
    footerslot / ReactNode / snippet-Area aksi di bagian bawah kartu, misalnya tombol. Angular: elemen dengan atribut footer.

    Aksesibilitas

    • Memakai elemen article, jadi kartu terbaca sebagai satu kesatuan konten.
    • Judul memakai h3. Sesuaikan struktur heading halaman bila kartu berada di bawah h1 langsung.
    • Tanpa JavaScript dan tanpa elemen interaktif bawaan.

    Komponen terkait

    Komponen data lain dengan class yang sama di setiap framework.