A complete profile setup component featuring animated avatar selection with a gallery of colorful avatars, username input with validation, and smooth transitions between states.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kokonut-labs/kokonutui/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Usage
Props
Callback fired when user clicks “Get Started” with valid username and selected avatar
Additional CSS classes to apply to the card container
Features
- Animated Avatar Preview: Large center stage showing selected avatar with color-matched glow effect
- Avatar Gallery: Thumbnail strip with 4 unique avatars, smooth selection animations
- Username Validation: Requires minimum 3 characters, shows character count (max 20)
- Visual Feedback:
- Selected avatar has ring outline and check mark
- Hover states on thumbnails
- Per-avatar color rings on main preview
- Error state for invalid username
- Accessible: Full ARIA labels, keyboard navigation, screen reader support
- Motion Reduced: Respects
prefers-reduced-motionsystem preference
Avatar Data
The component includes 4 pre-designed colorful avatars with unique expressions. Each avatar has:- Unique ID and color scheme
- SVG-based graphics that scale perfectly
- Custom RGB color values for the stage ring animation
Username Validation
- Minimum length: 3 characters
- Maximum length: 20 characters
- Character counter: Updates in real-time, turns amber at 18+ characters
- Error display: Shows validation message when username is too short
- Button state: Disabled until username meets minimum length
Customization
To use custom avatars, modify theavatars array in the component source:
Dependencies
lucide-react- Icon components (Check, ChevronRight, User2)motion(Framer Motion) - Animation libraryreact- Core React library@/components/ui/button- shadcn/ui Button component@/components/ui/card- shadcn/ui Card components@/components/ui/input- shadcn/ui Input component