Skip to content
Blobz docs

Profile Card

Compact and featured profiles with image fallbacks, biographies, and composable actions.

Compact

A compact profile with a larger avatar beside the name, a short introduction, and a shared footer for supporting details and an action. The footer stacks on narrow cards.

Kalpana Chawla

NASA
Astronaut & aerospace engineer

Exploring the skies through aerospace research and two Space Shuttle missions.

STS-87 · STS-107
View code
profile-card-example.tsx
import { ArrowUpRightIcon } from "lucide-react";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { ProfileCard } from "@/components/blobz/profile-card";

const PROFILE_NAME = "Kalpana Chawla";

export function ProfileCardExample() {
	return (
		<ProfileCard
			actions={
				<Button
					nativeButton={false}
					render={
						<a
							href="https://www.nasa.gov/image-article/kalpana-chawla/"
							rel="noopener"
							target="_blank"
						/>
					}
					size="sm"
					variant="outline"
				>
					Biography
					<ArrowUpRightIcon aria-hidden="true" data-icon="inline-end" />
				</Button>
			}
			avatar={{ name: PROFILE_NAME, palette: ["#dff4ff", "#38bdf8"] }}
			badge={<Badge variant="secondary">NASA</Badge>}
			bio="Exploring the skies through aerospace research and two Space Shuttle missions."
			className="max-w-sm"
			description="Astronaut & aerospace engineer"
			metadata="STS-87 · STS-107"
			name={PROFILE_NAME}
		/>
	);
}

Installation

npx shadcn@latest add @blobz/profile-card button badge

The shared Avatar and shadcn Card components are installed automatically. This command also includes the Button and Badge components used in the previews.

Usage

import { ProfileCard } from "@/components/blobz/profile-card";

<ProfileCard
  avatar={{ name: "Kalpana Chawla", palette: ["#dff4ff", "#38bdf8"] }}
  name="Kalpana Chawla"
  description="Astronaut & aerospace engineer"
  bio="Exploring the skies through aerospace research and two Space Shuttle missions."
/>

The image is optional. Without it, or if it fails to load, the avatar uses the generated fallback.

Use variant="featured" for a larger portrait and a subtle patterned header. Both variants use the same content and action slots.

Research

Janaki Ammal

A life of curiosity

A botanist and cytogeneticist whose work opened new perspectives on the plants around us.

Botany · Cytogenetics
View code
profile-card-featured-example.tsx
import { Badge } from "@/components/ui/badge";
import { ProfileCard } from "@/components/blobz/profile-card";

export function ProfileCardFeaturedExample() {
	return (
		<ProfileCard
			avatar={{
				name: "Janaki Ammal",
				palette: ["#e7f4ea", "#8aca9a"],
			}}
			badge={<Badge variant="outline">Research</Badge>}
			bio="A botanist and cytogeneticist whose work opened new perspectives on the plants around us."
			className="max-w-sm"
			description="A life of curiosity"
			metadata="Botany · Cytogenetics"
			name={"Janaki Ammal"}
			variant="featured"
		/>
	);
}

Composition

Use badge for a role or membership badge, metadata for supporting details, and actions for your application's buttons or links. In the compact layout, the badge sits beside the name and the metadata shares the footer with the actions. Empty sections are omitted automatically.

For compact identity rows, see Avatar Profile.

API

Accepts div props, including className, plus:

Prop

Type