Skip to main content
Version: 1.0.3

User Card

Overview

The Profile Card component displays user information in a clean, organized format. It supports both basic and advanced layouts with features like stats, verification badges, action buttons, and social media links.

Preview

Alex Thompson's avatar

Alex Thompson

@alexthompson

Passionate about building beautiful and accessible user interfaces. Love working with React, TypeScript, and modern web technologies.

Sarah Johnson's avatar
Verified

Sarah Johnson

@sarahj

Creating beautiful and intuitive user experiences. Passionate about design systems, accessibility, and user-centered design.

124Projects
12.5KFollowers
8.9KLikes

Background Header Image Layout

Emma Davis's header banner
Emma Davis's avatar

Emma Davis

@emmadavis

Leading product strategy and innovation.

124Projects
12.5KFollowers
8.9KLikes

Installation

ignix add component UserCard

Basic Usage

import { UserCard } from '';
import { FaGithub, FaLinkedin, FaTwitter } from 'react-icons/fa';

function BasicProfileCard() {
return (
<UserCard
name="Alex Thompson"
username="alexthompson"
role="Senior Frontend Developer"
bio="Passionate about building beautiful and accessible user interfaces."
avatar="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=400&h=400&fit=crop"
socialLinks={[
{
platform: "github",
url: "https://github.com/alexthompson",
label: "GitHub",
icon: FaGithub,
},
{
platform: "linkedin",
url: "https://linkedin.com/in/alexthompson",
label: "LinkedIn",
icon: FaLinkedin,
},
]}
/>
);
}

Vertical Layout

The default layout displays content vertically with the avatar centered at the top.

<UserCard
name="Sarah Johnson"
role="UI/UX Designer"
bio="Creating beautiful user experiences."
avatar="https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop"
orientation="vertical"
/>

Horizontal Layout

Display the profile card horizontally with avatar on the left and details on the right.

<UserCard
name="Michael Chen"
role="Full Stack Developer"
bio="Building modern web applications."
avatar="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d"
orientation="horizontal"
/>

Advanced Design

Enable advanced features including stats, verification badges, and action buttons. Note: Advanced design is restricted to vertical orientation only.

import { Users, MessageCircle, Heart, TrendingUp } from 'lucide-react';

<UserCard
advanced
name="Emma Davis"
username="emmadavis"
role="Product Manager"
bio="Leading product strategy and innovation."
avatar="https://images.unsplash.com/photo-1438761681033-6461ffad8d80"
verified={true}
stats={[
{ label: "Projects", value: 124, icon: TrendingUp },
{ label: "Followers", value: "12.5K", icon: Users },
{ label: "Likes", value: "8.9K", icon: Heart },
]}
actions={[
{ label: "Follow", variant: "default", icon: Users },
{ label: "Message", variant: "outline", icon: MessageCircle },
]}
backgroundPattern="gradient"
/>

Props

PropTypeDefaultDescription
namestringrequiredUser's full name
avatarstring-Avatar image URL
usernamestring-User's username/handle (e.g., "@username")
rolestring-User's role or job title
biostring-User's bio or description
socialLinksSocialLink[][]Array of social media links
orientation"vertical" | "horizontal""vertical"Card layout orientation
variant"default" | "elevated" | "glass" | "outline" | "minimal""default"Card variant style
size"sm" | "md" | "lg" | "xl""md"Card size
avatarSizeAvatarProps["size"]-Avatar size (overrides size-based default)
avatarShape'circle' | 'square' | 'rounded' | 'decagon' | 'hexagon' | 'pentagon' | 'star' | 'diamond' | 'triangle' | 'triangle-down' | 'parallelogram' | 'rhombus' | 'cross' | 'octagon' | 'ellipse' | 'egg' | 'trapezoid''circle'Shape of the avatar
avatarBorderedbooleanfalseShow avatar border
avatarStatus"online" | "offline" | "away" | "busy"-Avatar status indicator
avatarFallbackstring-Fallback text for avatar (initials)
headerImagestring-Header/banner image URL (for horizontal layout)
advancedbooleanfalseEnable advanced design features (vertical only)
statsStatItem[]-Stats/metrics to display (advanced mode)
verifiedbooleanfalseShow verification badge (advanced mode)
premiumbooleanfalseShow premium badge (advanced mode)
badgestring-Custom badge text (advanced mode)
actionsActionButton[]-Action buttons (advanced mode)
backgroundPattern"gradient" | "dots" | "grid" | "none""none"Background pattern (advanced mode)
interface SocialLink {
url: string;
icon: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>;
label: string;
platform?: string;
}

StatItem Interface

interface StatItem {
label: string;
value: number | string;
icon?: React.ComponentType<{ className?: string }>;
}

ActionButton Interface

interface ActionButton {
label: string;
variant?: "default" | "outline" | "ghost";
onClick?: () => void;
icon?: React.ComponentType<{ className?: string }>;
}