---
layout: ~/layouts/MdxDocLayout.astro
title: "Layer Card"
description: "A card component with a layered visual effect, perfect for navigation or feature highlights."
sourceFile: "components/layer-card"
---

import ComponentExample from "~/components/docs/ComponentExample.astro";
import ComponentSection from "~/components/docs/ComponentSection.astro";
import Heading from "~/components/docs/Heading.astro";
import PropsTable from "~/components/docs/PropsTable.astro";
import {
  LayerCardDemo,
  LayerCardBasicDemo,
  LayerCardMultipleDemo,
} from "~/components/demos/LayerCardDemo";

{/* Hero Demo */}

<ComponentSection>
  <ComponentExample demo="LayerCardDemo">
    <LayerCardDemo client:visible />
  </ComponentExample>
</ComponentSection>

{/* Installation */}

<ComponentSection>
  <Heading level={2}>Installation</Heading>
  <Heading level={3}>Barrel</Heading>

```tsx
import { LayerCard } from "@cloudflare/kumo";
```

<Heading level={3}>Granular</Heading>

```tsx
import { LayerCard } from "@cloudflare/kumo/components/layer-card";
```

</ComponentSection>

{/* Usage */}

<ComponentSection>
  <Heading level={2}>Usage</Heading>

```tsx
import { LayerCard } from "@cloudflare/kumo";

export default function Example() {
  return (
    <LayerCard className="w-[250px]">
      <LayerCard.Secondary>Documentation</LayerCard.Secondary>
      <LayerCard.Primary>Learn how to use Kumo components</LayerCard.Primary>
    </LayerCard>
  );
}
```

</ComponentSection>

{/* Examples */}

<ComponentSection>
  <Heading level={2}>Examples</Heading>

<Heading level={3}>Basic Card</Heading>
<ComponentExample demo="LayerCardBasicDemo">
  <LayerCardBasicDemo client:visible />
</ComponentExample>

<Heading level={3}>Multiple Cards</Heading>
<ComponentExample demo="LayerCardMultipleDemo">
  <LayerCardMultipleDemo client:visible />
</ComponentExample>

</ComponentSection>

{/* API Reference */}

<ComponentSection>
  <Heading level={2}>API Reference</Heading>
  <PropsTable component="LayerCard" />
</ComponentSection>
