Profile Card
Centered profile card with gradient avatar, bio, and follow button.
Sara Khan
@sarakhan
Frontend developer. CSS nerd. Building in public.
<div class="w-full max-w-xs rounded-2xl border border-neutral-200 bg-white p-6 text-center shadow-sm dark:border-neutral-700 dark:bg-neutral-900">
<div class="mx-auto h-20 w-20 rounded-full bg-gradient-to-br from-indigo-500 to-pink-500 p-1">
<div class="flex h-full w-full items-center justify-center rounded-full bg-white text-xl font-bold text-indigo-600 dark:bg-neutral-900 dark:text-indigo-300">SK</div>
</div>
<p class="mt-3 text-lg font-bold text-neutral-900 dark:text-white">Sara Khan</p>
<p class="text-sm text-neutral-500">@sarakhan</p>
<p class="mt-2 text-sm text-neutral-600 dark:text-neutral-400">Frontend developer. CSS nerd. Building in public.</p>
<button class="mt-4 w-full rounded-xl bg-indigo-600 py-2 text-sm font-semibold text-white transition hover:bg-indigo-700">Follow</button>
</div>Free to use in personal and commercial projects. No attribution required.
Variants
Same component, different looks. Preview each one live and copy the code you like.
With stats
Add the stats row for creator profiles where follower counts drive the follow decision.
Sara Khan
@sarakhan
248
Posts
12k
Followers
340
Following
Message first
The message-first layout suits team directories and marketplaces where contact matters more than follows.
Bilal Ahmed
@bilalahmed
Product designer. Coffee first, pixels second.
Minimal
The minimal card works in dense grids like search results where every pixel counts.
Sara Khan
@sarakhan
About this profile card
The profile card is the compact identity block used across team pages, author bios, and social sidebars: a ringed avatar on top, name and handle, one bio line, and a full-width follow button. Centered text and generous padding give it a friendly, approachable feel.
The avatar is a gradient ring made from a padded circle with the initials set in an inner circle, which looks intentional even without a photo. The card is capped at max-w-xs with w-full so it fills narrow columns on mobile without overflowing, and the follow button stretches full width for an easy tap target.
Use it for team member grids, blog author bios, community member lists, and suggested-follows sidebars. One bio line forces brevity, which keeps grids of these cards visually even.
Trust on the web is built in about two seconds from a face, a name, and one proof of credibility. Team pages, author bios, and social sidebars all need that compact identity block: who this is, what they do, and a single action to connect. The profile card standardizes those pieces so every person on the page gets the same fair, scannable treatment.
The avatar is a gradient ring: a padded circle with the person's initials set in an inner solid circle, which looks deliberate even before a real photo exists. The card caps at max-w-xs with w-full so it fills narrow mobile columns without overflowing, and the follow button stretches full width as the one clear action. Centered text and generous padding keep the tone approachable.
A single row of three stats, posts, followers, following, turns the card from a nameplate into a profile. Format large numbers compactly: 12.4k, not 12,438. Put the primary action, Follow or Connect, as a full-width button under the stats; secondary actions like Message belong as quiet text links. If the person has no stats worth showing, drop the row entirely; zeros and ones undermine more trust than they build.
Never make the entire card a link with the follow button nested inside it. Nested interactive elements break keyboard navigation, confuse screen readers, and cause mis-taps when a finger aiming for Follow lands on the card link instead. Link the avatar and name to the profile, and keep the follow button a separate, real button beside them.
Where to use it
- ✓ Team member grids on about pages
- ✓ Author bio cards under blog posts
- ✓ Suggested follows in social app sidebars
- ✓ Speaker cards on event pages
Customization tips
Replace the initials block with an img tag using rounded-full object-cover for a real photo inside the same gradient ring. Add a stats row with post and follower counts above the button, or turn Follow into a toggle that switches to Following with an outline style.
Design notes
When to use
A profile card condenses a person into a scannable unit for team pages, author bios, or social features: face, name, one-line bio, and a single action. The gradient avatar ring draws the eye to the person first, which is the right hierarchy for a people-centric component. One clear follow or contact button beats a row of five social icons that nobody clicks.
What to avoid
Do not cram a full resume into a profile card, long bios belong on a dedicated profile page. Avoid the follow button when the viewer is looking at their own profile, it reads as a bug. And do not use a generic silhouette when a real photo or initials exist, faces build trust that placeholders cannot.
Accessibility
The avatar image needs meaningful alt text with the person's name, or be hidden if the name sits right beside it. The follow button must announce its pressed state with aria-pressed so the action is reversible and clear.
Frequently asked questions
How do I use a real photo instead of initials?
Swap the inner div for an img with class h-full w-full rounded-full object-cover and your photo URL. Keep the outer gradient wrapper and p-1 so the ring effect stays intact.
What if the person has no photo?
That is what the initials version is for. Use the first letters of the first and last name on a gradient or solid background; it looks deliberate and loads instantly.
Will it stay centered on mobile?
Yes. The card is w-full with max-w-xs, so it fills its container up to 320px. Place it in a parent with flex justify-center or mx-auto and it centers on any screen.
How do I build a responsive profile card with Tailwind?
Stack the avatar above the text with flex-col on mobile, then switch to flex-row with items-center at the sm breakpoint so the avatar sits beside the bio on wider screens. Keep the card max-w-sm and centered with mx-auto. The text should stay centered on mobile and left-align once the row layout kicks in.
What image size works best for the avatar?
Upload a square source image at least 256px wide and render it with aspect-square and object-cover, which crops cleanly to a circle without distortion. Smaller sources look soft on retina screens. If you only have a rectangular photo, object-cover centered on the face does the cropping for you.
How do I add a Follow button to the profile card?
Place a full-width button under the bio on mobile, or align it to the right of the name row on desktop. Toggle its label and style between Follow and Following on click, and add aria-pressed so screen readers announce the state. Keep the button out of the avatar link so the two targets do not nest.
Customize it with our tools
Related elements
Glass card
Frosted glass effect with backdrop blur. Looks best over a colorful background.
Glass Card
Frosted glass card with subtle border and blur.
Hover lift card
Subtle lift plus shadow sells interactivity without layout shift.
Hover Lift Card
Card that lifts with a deepening shadow on hover.
Revenue
$48.2k
12.4%
Stat Card
Metric card with trend indicator.