Skip to content
Back to Components

bash
npm install @hua-labs/hua
tsx
import { ProfileCard } from "@hua-labs/ui/advanced/dashboard";

J
John Doe!Premium
john@example.com
가입일 2024년 1월 1일

J
Hello
Jane Smith!Pro
jane@example.com
가입일 2023년 6월 15일

default
D
Default Style!Basic
default@example.com
gradient
G
Gradient!Premium
gradient@example.com
minimal
M
Minimal!Pro
minimal@example.com

B
Basic!Basic
basic@example.com
P
Pro!Pro
pro@example.com
P
Premium!Premium
premium@example.com
A
Admin!Admin
admin@example.com

Bob Wilson!Pro
bob@example.com

Props

name*string-User name
emailstring-User email address
avatarstring-Avatar image URL
avatarAltstring-Avatar alt text
greetingstring-Greeting message shown above the name
memberSinceDate | string-Date when user joined
membershipTier"basic" | "pro" | "premium" | "admin"-Membership tier level
membershipLabelstring-Custom label for membership badge
onSettingsClick() => void-Handler for settings button click
settingsHrefstring-URL for settings link
variant"default" | "gradient" | "minimal""default"Visual style variant
showAvatarbooleantrueWhether to show the avatar
showMembershipbooleantrueWhether to show the membership badge
showSettingsbooleantrueWhether to show the settings button

BasicProfileCard.tsxtsx
import { ProfileCard } from "@hua-labs/ui/advanced/dashboard";

export function BasicProfileCard() {
  return (
    <ProfileCard
      name="John Doe"
      email="john@example.com"
      membershipTier="premium"
      memberSince={new Date("2024-01-01")}
      onSettingsClick={() => console.log("Settings clicked")}
    />
  );
}

ProfileCardWithGreeting.tsxtsx
import { ProfileCard } from "@hua-labs/ui/advanced/dashboard";

export function ProfileCardWithGreeting() {
  return (
    <ProfileCard
      name="Jane Smith"
      greeting="Hello"
      variant="gradient"
      membershipTier="pro"
      settingsHref="/settings"
    />
  );
}