Visita Design System
We have established a strict UI engineering standard utilizing Framer Motion for interactions and Lenis for scroll smoothing. This document outlines the required stack and enforcement rules for all frontend development.Technology Stack
The Visita frontend is built on a specific set of technologies chosen for performance and aesthetic quality.| Technology | Role | Requirement |
|---|---|---|
| Framer Motion | Animation Engine | Required for all interactive elements and page transitions. |
| Lenis | Scroll Smoothing | Global smooth scroll is active. Do not interfere with scroll behavior. |
| Tailwind CSS | Styling | Utility-first styling with our custom tailwind.config.ts. |
| shadcn/ui | Component Library | Base accessible components, styled with Tailwind. |
Motion Primitives
We have abstracted common animations into reusable components found incomponents/motion/. Use these instead of writing raw motion.div code where possible.
<FadeIn>
Use for general content entering the viewport. It provides a subtle rise and fade-in effect.
<StaggerList>
Use for lists, feeds, or grids of items (e.g., voting stations, ward feeds). It orchestrates child animations.
<ScaleButton>
Use for all primary actions and clickable cards. It adds a tactile scale effect on hover and tap.
<ParallaxHero>
Use for top-level page headers (e.g., Ward Landing, Profile). It handles scroll-linked parallax effects for background images.
Best Practices & Enforcement
Adhere to these rules to maintain the “premium” feel of the platform.Animation & Transitions
- Always wrap page transitions. Use the
PageTransitioncomponent ortemplate.tsxto ensure smooth navigation between routes. - Do not use native CSS
scroll-behavior: smooth. This conflicts with Lenis. Let Lenis handle all scrolling.
Typography
- Tight Headings: Use
tracking-tighton all H1 and H2 headers to create a modern, dense typographic feel. - Inter Font Features: Ensure the
Interfont is loaded withcv05(loops on ‘l’) andcv11(flat top ‘3’) where appropriate for legibility.
Component Usage
- Prefer
shadcn/uicomponents for form elements and overlays. - Use
components/motionprimitives before writing custom animation logic.