Card
Card is part of the Layout and content group. Composable surface for grouped content and actions.
Installation
Section titled “Installation”npx bambiui add card --framework reactnpx bambiui add card --framework solidnpx bambiui add card --framework sveltenpx bambiui add card --framework vueimport { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card";
export function Example() { return <Card />;}import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "~/components/ui/card";
export function Example() { return <Card />;}<script lang="ts"> import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "$lib/components/ui/card";</script>
<Card /><script setup lang="ts">import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card";</script>
<template> <Card /></template>Preview
Section titled “Preview”
Card preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use for dashboards, settings panels, and content previews.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Card. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooterTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-background--bambi-foreground--bambi-border--bambi-radius-lg