Installation
Usage
Props
Profile data object containing:
name(string): User’s display nameemail(string): User’s email addressavatar(string): URL to user’s avatar imagesubscription(string, optional): Subscription tier (e.g., “PRO”)model(string, optional): AI model being used (e.g., “Gemini 2.0 Flash”)
Additional CSS classes to apply to the dropdown container
Whether to show the topbar (reserved for future use)
Features
- Gradient Avatar: Colorful gradient border around user avatar
- Status Badges: Displays subscription and model information with color-coded badges
- Menu Items: Pre-configured menu with common profile actions
- Visual Indicator: Curved line indicator that animates on hover and open state
- Sign Out Action: Prominent red-styled sign out button
- Smooth Animations: Fade, zoom, and slide animations for menu appearance
- Dark Mode Support: Fully styled for both light and dark themes
Menu Items
The dropdown includes these default menu items:- Profile - User icon, links to profile page
- Model - Shows current AI model with badge (e.g., “Gemini 2.0 Flash”)
- Subscription - Shows subscription tier with badge (e.g., “PRO”)
- Settings - Settings icon, links to settings page
- Terms & Policies - FileText icon, links to legal pages
- Sign Out - Logout action in red styling
Example with Custom Data
Styling Details
Trigger Button
- Rounded corners (
rounded-2xl) - Subtle border with hover effect
- Smooth background transitions
- Gradient avatar border (purple → pink → orange)
Dropdown Menu
- Backdrop blur effect for modern look
- Shadow with theme-aware colors
- Rounded corners (
rounded-2xl) - Animated entrance (fade + zoom + slide)
Menu Items
- Hover state with background and border
- Icon + label layout
- Optional badge display for status items
- Smooth transitions on all interactions
Visual Indicator
The bending line indicator on the right side of the trigger button:- Changes color from gray to blue when active
- Scales up slightly when menu is open
- Smooth transitions for all state changes
Badge Colors
- Model Badge: Blue background (
bg-blue-50/bg-blue-500/10) - Subscription Badge: Purple background (
bg-purple-50/bg-purple-500/10)
Accessibility
- Uses Radix UI DropdownMenu primitives
- Proper ARIA labels and roles
- Keyboard navigation support
- Focus management
- Screen reader friendly
Dependencies
react(useState hook)lucide-react(Settings, CreditCard, FileText, LogOut, User icons)next/imagenext/link@/components/ui/dropdown-menu@/components/icons/gemini@/lib/utils(cn utility)