Overview
TheRedesSociales component displays an engaging, interactive section with links to PROVESA’s social media profiles. Features animated entrances, hover effects, and branded icon buttons for Facebook, Instagram, TikTok, and WhatsApp.
Location
Props
Footer data object containing social media URLs
Features
- Intersection Observer: Animates in when section enters viewport
- Staggered Animations: Each social icon animates in sequentially
- Hover Effects: Individual icon hover states with shadows and scale
- Brand Colors: Each platform has its authentic brand color/gradient
- Responsive Layout: 2-column grid on mobile, horizontal row on larger screens
- WhatsApp Smart Formatting: Automatically converts phone numbers to wa.me links
- Accessibility: Proper ARIA labels and semantic HTML
Social Platforms
Color: #1877F2 (Facebook Blue)Icon: Facebook logo from Lucide
Gradient: Multi-color Instagram gradient (yellow → red → purple → blue)Icon: Instagram logo from Lucide
TikTok
Color: #000000 (Black)Icon: Music2 from Lucide (represents TikTok)
Color: #25D366 (WhatsApp Green)Icon: Phone from LucideSmart Link: Converts phone numbers to wa.me format
Usage Example
Basic Usage
+page.svelte
With Database Data
From/src/routes/+page.server.js:13:
+page.server.js
+page.svelte
WhatsApp Number Formatting
The component intelligently formats WhatsApp numbers:Animation Behavior
The component uses an Intersection Observer to detect when it enters the viewport:- Before Visible: Opacity 0, translated down 10px
- When Visible (20% threshold):
- Main card fades in over 800ms
- Each social icon flies in with 150ms stagger
- Decorative blobs fade in over 1000ms
Visual Structure
Hover States
Each social icon button has multi-layered hover effects:- Background: Transitions from white to platform brand color
- Icon: Scales 110% and changes to white
- Shadow: Expands with platform-specific color
- Label: Fades in and slides up below the icon
- Shine Effect: Radial white glow expands from center
Styling
The component uses:- Glass-morphism: Frosted glass effect on main card (
backdrop-blur-2xl) - Soft Shadows: Layered shadows for depth
- Rounded Corners: 40px/60px border radius for main card, 24px/32px for icons
- Background Decorations: Subtle gradient blobs with blur effects
Dependencies
lucide-svelte- Icons (Facebook, Instagram, Music2, Phone/WhatsApp, ArrowRight)svelte/transition- Fade and fly animations
Accessibility
target="_blank"for external linksrel="noopener noreferrer"for securityaria-labelwith descriptive text for each platform
Related
- Footer Service - Backend service for footer data
- Public Website Features - Homepage integration
