A comprehensive follow functionality system for the AlienFlowSpace DAO platform, featuring modern design with accessibility compliance and modular architecture.
- Headers: Orbitron font for techno-style aesthetics
- Body Text: Exo font for readability
- Special Elements: Nasalization font for buttons and UI elements
- Primary: Gold (
#F0D882) - Follow actions - Secondary: Green (
#22C55E) - Following status - Accent: Blue (
#3B82F6) - Information and badges - Warning: Orange (
#F59E0B) - Alerts - Error: Red (
#EF4444) - Unfollow actions - Success: Success Green (
#10B981) - Verified status - Info: Info Blue (
#3B82F6) - Additional information
- xs: 0.75rem (12px)
- sm: 0.875rem (14px)
- base: 1rem (16px)
- lg: 1.125rem (18px)
- xl: 1.25rem (20px)
- 2xl: 1.5rem (24px)
- 3xl: 1.875rem (30px)
- 4xl: 2.25rem (36px)
- 5xl: 3rem (48px)
- 6xl: 3.75rem (60px)
Interactive button component for follow/unfollow actions.
Features:
- Optimistic updates
- Loading states
- Multiple variants (default, compact, outline)
- Multiple sizes (sm, md, lg)
- Smooth animations
- Accessibility compliant
Usage:
import FollowButton from '@/components/FollowButton';
<FollowButton
user={user}
variant="default"
size="md"
onFollowChange={(isFollowing) => console.log('Follow status:', isFollowing)}
/>Display component for user profiles with follow functionality.
Features:
- Multiple variants (default, compact, detailed)
- Avatar with fallback
- Verification badges
- Social links
- Follow statistics
- Responsive design
Usage:
import UserCard from '@/components/UserCard';
<UserCard
user={user}
variant="detailed"
showFollowButton={true}
/>Statistics display component for follow metrics.
Features:
- Followers count
- Following count
- Mutual connections
- Progress indicators
- Multiple variants
Usage:
import FollowStats from '@/components/FollowStats';
<FollowStats
stats={followStats}
variant="detailed"
/>Custom hook for managing follow state and actions.
Features:
- State management
- Optimistic updates
- Error handling
- Loading states
Usage:
import { useFollow } from '@/hooks/useFollow';
const { isFollowing, isLoading, toggleFollow } = useFollow(initialFollowing);interface User {
id: string;
username: string;
displayName: string;
avatar?: string;
bio?: string;
location?: string;
website?: string;
joinedAt: Date;
followersCount: number;
followingCount: number;
isVerified: boolean;
badges: Badge[];
socialLinks: SocialLink[];
}interface FollowStats {
followersCount: number;
followingCount: number;
mutualCount: number;
}Access the demo at /follow-demo to see all components in action with sample data.
Features:
- Interactive controls
- Multiple card variants
- Statistics overview
- Design features showcase
- Responsive layout
- WCAG AA Compliance: All colors meet contrast requirements
- Keyboard Navigation: Full keyboard support
- Screen Reader Support: Proper ARIA labels and semantic HTML
- Focus Management: Clear focus indicators
- Loading States: Clear feedback for async operations
- Optimistic Updates: Immediate UI feedback
- Debounced Actions: Prevent rapid-fire requests
- Lazy Loading: Components load on demand
- Memoization: React.memo for expensive components
- Efficient Re-renders: Minimal state updates
- Real-time Updates: WebSocket integration
- Follow Suggestions: AI-powered recommendations
- Follow Lists: Curated lists and categories
- Analytics: Follow engagement metrics
- Notifications: Follow event notifications
The follow system is already integrated into the AlienFlowSpace DAO platform. No additional installation required.
<FollowButton user={user} /><UserCard user={user} variant="compact" /><FollowStats stats={stats} variant="detailed" /><FollowButton
user={user}
className="custom-follow-button"
variant="outline"
size="lg"
/>When contributing to the follow system:
- Maintain WCAG AA compliance
- Follow the established modular scale
- Use Orbitron for headers
- Test with screen readers
- Ensure responsive design
- Add proper TypeScript types
- Include accessibility tests
This follow system is part of the AlienFlowSpace DAO platform and follows the same licensing terms.