Componentdata0.8 KB gzipZero dependencies
User Card
Profile card with avatar, role, meta chips and action slot.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add user-cardOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { UserCard } from "@/components/ui/user-card"; <UserCard />Source code
user-card.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxuser-card.tsx68 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface UserCardProps extends Omit<React.HTMLAttributes<HTMLElement>, "role"> { initials?: string; name?: string; role?: string; meta?: string[]; className?: string; onAction?: () => void;} export function UserCard({ initials = "JD", name = "John Doe", role = "Developer",Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { UserCard } from "@/components/ui/user-card"; <UserCard />| Prop | Type | Description |
|---|---|---|
| initials | string | Configures initials. (Default: "JD") |
| name | string | Form field name submitted during form serialization. (Default: "John Doe") |
| role | string | Configures role. (Default: "Developer") |
| meta | string[] | Configures meta. (Default: []) |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |
| onAction | () => void | Callback invoked on action. |