Molecules
Molecules are simple composite components that combine multiple atoms to create functional UI elements. They represent the next level up from atoms in the atomic design hierarchy.Overview
The/components/molecules directory contains 23 components organized into functional categories:
Display Cards
GuruCard, EventCard, ScheduleCard, TransportCard
Form Inputs
PhoneInput, DatePicker variants, CountrySelector
UI Elements
CountdownTimer, ProgressCounter, Carousel, Dialog
Display Cards
GuruCard
Displays guru images with grayscale effect and gradient borders. Props Interface:components/molecules/guru-card.tsx
- Responsive sizing:
w-72 sm:w-80 md:w-[26rem] - Grayscale filter on images
- Gradient border effect
- Dark overlay on hover (desktop only)
- Cloudflare CDN integration
EventCard
Comprehensive event display card with media, metadata, and tags. Props Interface:components/molecules/event-card.tsx
components/molecules/event-card.tsx
- YouTube embed or photo thumbnail
- Formatted date display
- Tag badges with color coding
- Staggered animation entrance
- Click handlers for media and details
ScheduleCard
Detailed schedule event card with time, location, and tags. Usage:TransportCard
Simple card for transportation information. Usage:Form Input Components
PhoneInput
International phone number input with country selector. Props Interface:components/molecules/phone-input.tsx
- Flag icons for countries
- Searchable country dropdown
- Automatic formatting
- Validation support
- Custom styling with registration theme
CountrySelector
Dropdown for selecting countries with predefined options. Props Interface:components/molecules/country-selector.tsx
- India
- USA
- England
- Australia
- Canada
- Kenya
RegistrationDatePicker
Date picker optimized for registration forms. Usage:components/molecules/registration-date-picker.tsx
LazyDatePicker
Lazy-loaded date picker for performance optimization. Usage:LazyPhoneInput
Lazy-loaded phone input component. Usage:components/molecules/lazy-phone-input.tsx
EventsDatePicker
Date picker specifically for event filtering. Usage:UI Elements
CountdownTimer
Animated countdown timer to target date. Props Interface:components/molecules/countdown-timer.tsx
- Real-time countdown updates
- Animated digit transitions
- Responsive sizing
- Zero-padded values
- Serif font for numbers
components/molecules/countdown-timer.tsx
ProgressCounter
Animated progress counter with icon and progress bar. Props Interface:components/molecules/progress-counter.tsx
- Animated count-up effect
- Progress bar visualization
- Percentage display
- Icon with gradient background
- Hover effects
- Intersection observer trigger
Carousel
Image carousel with navigation controls. Usage:components/molecules/carousel.tsx
VideoCarouselButtons
Custom video carousel navigation buttons. Props Interface:components/molecules/video-carousel-buttons.tsx
VideoCarouselDots
Dot indicators for video carousel. Props Interface:components/molecules/video-carousel-dots.tsx
Dialog
Modal dialog component. Usage:components/molecules/dialog.tsx
Command
Command palette / search component. Usage:Toaster
Toast notification container. Usage:components/molecules/toaster.tsx
Specialized Components
TimelineGridTile
Timeline event tile for schedule display. Props Interface:components/molecules/TimelineGridTile.tsx
IphoneMock
iPhone device mockup wrapper. Usage:components/molecules/iphone-mock.tsx
3DPin
3D pin effect component (from Aceternity UI). Usage:Form Integration Patterns
With react-hook-form
With Zod Validation
Animation Patterns
Molecules frequently use Framer Motion:Entrance Animations
Hover Effects
Scroll-triggered Counters
Best Practices
Component Reusability
Component Reusability
Design molecules to be reusable across different contexts:
Performance
Performance
- Use lazy loading for heavy components
- Implement intersection observer for animations
- Memoize expensive calculations
- Optimize re-renders with React.memo
Accessibility
Accessibility
- Include ARIA labels
- Support keyboard navigation
- Provide focus indicators
- Use semantic HTML
Next Steps
Organisms
Learn about complex sections built from molecules
Atoms
Review the building blocks used in molecules
