Components
User Profile
A profile summary card with cover, stats and actions.
Installation
$ npx veil-ui@latest add user-profileUsage
import { UserProfile } from "@/components/ui/user-profile";
<UserProfile
name="Mira Chen"
handle="@mirachen"
bio="Product lead at Acme."
stats={[{ label: "Followers", value: "1.2k" }]}
/>;Examples
Basic
AL
Ada Lovelace
@ada
Mathematician and writer. Building tools for the next generation of computing.
- 12.4k
- Followers
- 28
- Projects
- 3.1k
- Stars
Compact
GH
Grace Hopper
@grace
Compiler pioneer.
Arlington, VA
- 8.2k
- Followers
API reference
The package exports user-profile along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.
Accessibility
- Forms use native inputs with associated labels and descriptive error text.
- Submission states are announced through disabled controls and live error messaging.
- Social providers are buttons with discernible provider names.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add user-profile --framework vue or switch the framework in components.json.
<template>
<div data-slot="user-profile" class="flex flex-col gap-4 rounded-lg border bg-card text-card-foreground shadow-xs max-w-xl overflow-hidden py-0"><div class="h-24 bg-gradient-to-r from-primary/20 via-muted to-background"></div><div data-slot="card-header" class="grid auto-rows-min items-start gap-1 has-[[data-slot=card-action]]:grid-cols-[1fr_auto] -mt-10 px-5"><span data-slot="avatar" data-size="lg" class="relative flex shrink-0 overflow-hidden rounded-full bg-muted size-10 text-sm ring-4 ring-card"><span data-slot="avatar-fallback" class="flex size-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground">AL</span></span><div><h2 class="text-base font-semibold">Ada Lovelace</h2><p class="text-sm text-muted-foreground">@ada</p></div></div><div data-slot="card-content" class="grid gap-4 px-5"><p class="text-sm text-muted-foreground">Mathematician and writer. Building tools for the next generation of computing.</p><div class="flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground"><span class="inline-flex items-center gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-map-pin size-3.5" aria-hidden="true"><path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"></path><circle cx="12" cy="10" r="3"></circle></svg> London, UK</span><a href="https://ada.dev" class="inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link-2 size-3.5" aria-hidden="true"><path d="M9 17H7A5 5 0 0 1 7 7h2"></path><path d="M15 7h2a5 5 0 1 1 0 10h-2"></path><line x1="8" x2="16" y1="12" y2="12"></line></svg> https://ada.dev</a><span class="inline-flex items-center gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar-days size-3.5" aria-hidden="true"><path d="M8 2v3"></path><path d="M16 2v3"></path><rect x="3" y="3" width="18" height="18" rx="2"></rect><path d="M3 9h18"></path><path d="M8 13h.01"></path><path d="M12 13h.01"></path><path d="M16 13h.01"></path><path d="M8 17h.01"></path><path d="M12 17h.01"></path><path d="M16 17h.01"></path></svg> Joined March 2024</span></div><dl class="grid grid-cols-3 gap-2 rounded-lg border bg-muted/20 p-3 text-center"><div><dd class="text-sm font-semibold">12.4k</dd><dt class="text-xs text-muted-foreground">Followers</dt></div><div><dd class="text-sm font-semibold">28</dd><dt class="text-xs text-muted-foreground">Projects</dt></div><div><dd class="text-sm font-semibold">3.1k</dd><dt class="text-xs text-muted-foreground">Stars</dt></div></dl></div><div data-slot="card-footer" class="flex items-center border-t px-5 py-3"><button data-slot="button" data-variant="default" data-size="sm" class="inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap font-medium outline-none transition-[color,background-color,border-color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 h-8 rounded-md px-3 text-xs">Follow</button><button data-slot="button" data-variant="outline" data-size="sm" class="inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap font-medium outline-none transition-[color,background-color,border-color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-8 rounded-md px-3 text-xs">Message</button></div></div>
</template>