Visual Components
Visual components focus on presentation and styling, with limited interactivity. They are the building blocks for creating consistent, branded user interfaces across the BuildAppsWith platform.
Core Visual Components
Visual components are organized into several categories based on their purpose and domain:
Marketing Components
Marketing components are used for building landing pages and promotional content:
| Component | Purpose | Variants | Status |
|---|
| Hero | Main landing page banner | Center, Split, Background Image | Completed |
| Feature Display | Display product features | Grid, List, Cards | Completed |
| Social Proof | Display testimonials and clients | Logo Grid, Quotes, Stats | In Progress |
| Pricing Table | Display pricing options | Feature Comparison, Simple | Planned |
| Call to Action | Drive user conversions | Button, Banner, Inline | Completed |
Marketing components should always include responsive design for mobile, tablet, and desktop views.
// Example Hero Component
import { Hero } from '@/components/marketing/ui/hero';
function LandingPage() {
return (
<Hero
title="Build Apps with Expert Developers"
subtitle="Find vetted developers for your project"
cta={{
primary: {
text: "Find Developers",
href: "/marketplace"
},
secondary: {
text: "Learn More",
href: "/how-it-works"
}
}}
image="/images/hero-image.png"
variant="split"
/>
);
}
Marketplace Components
Marketplace components are used for builder discovery and marketplace functionality:
| Component | Purpose | Variants | Status |
|---|
| Builder Card | Display builder profile | Standard, Featured, Compact | Completed |
| Builder Grid | Display multiple builders | Grid, List | Completed |
| Filter Panel | Filter marketplace results | Sidebar, Dropdown | Completed |
| Sort Controls | Control result sorting | Dropdown, Radio | Completed |
| Search Box | Search marketplace | Simple, Advanced | Completed |
Profile Components
Profile components are used for displaying user and builder profiles:
| Component | Purpose | Variants | Status |
|---|
| Profile Header | Display user details | Standard, Compact | Completed |
| Skill Display | Show user skills | Tags, Progress Bars, Icons | Completed |
| Portfolio Gallery | Display portfolio items | Grid, Carousel | In Progress |
| Testimonial Card | Display client testimonials | Quote, Detailed | Completed |
| Stats Display | Show user statistics | Numbers, Charts | Planned |
// Example Profile Header
import { ProfileHeader } from '@/components/profile/ui/profile-header';
function BuilderProfile({ builder }) {
return (
<ProfileHeader
user={builder}
avatarSize="lg"
showAvailability={true}
showContactButton={true}
variant="standard"
/>
);
}
Trust Components
Trust components are used to build credibility and trust with users:
| Component | Purpose | Variants | Status |
|---|
| Validation Badge | Display validation tier | Icon, Full, Minimal | Completed |
| Review Stars | Show ratings | Read-only, Interactive | Completed |
| Trust Indicators | Display trust signals | Icons, Cards | Completed |
| Verification Status | Show verification state | Badge, Banner | In Progress |
| Security Features | Display security info | Icons, Details | Planned |
Design Patterns
Responsive Design
All visual components support multiple breakpoints:
// Responsive variants with Tailwind
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{builders.map(builder => (
<BuilderCard key={builder.id} builder={builder} />
))}
</div>
Theming
Components support dark and light mode through Tailwind’s theme system:
// Dark mode support
<div className="bg-white dark:bg-slate-900 text-black dark:text-white">
<h2 className="text-slate-900 dark:text-white">Heading</h2>
<p className="text-slate-700 dark:text-slate-300">Content</p>
</div>
Animation
Visual components can include subtle animations using CSS transitions or Framer Motion:
// Framer Motion example
import { motion } from 'framer-motion';
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
>
Content with entrance animation
</motion.div>
Accessibility
Visual components follow WCAG 2.1 AA standards:
- Color Contrast: All text has sufficient contrast ratio (at least 4.5:1 for normal text)
- Screen Readers: Proper ARIA labels and semantic HTML
- Keyboard Navigation: All interactive elements are keyboard accessible
- Focus States: Visible focus states for keyboard users
- Reduced Motion: Support for users who prefer reduced motion
// Accessibility example
<button
className="focus:ring-2 focus:ring-offset-2 focus:ring-primary focus:outline-none"
aria-label="Search for builders"
>
<SearchIcon className="h-5 w-5" />
</button>
Error & Empty States
Visual components handle error and empty states gracefully:
// Empty state example
function BuilderList({ builders }) {
if (builders.length === 0) {
return (
<div className="text-center py-12 px-4">
<NoResultsIcon className="h-12 w-12 mx-auto text-muted" />
<h3 className="mt-4 text-lg font-medium">No builders found</h3>
<p className="mt-2 text-sm text-muted">
Try adjusting your filters or search query
</p>
</div>
);
}
return (/* Normal render */);
}
Implementation Guidelines
When implementing visual components:
- Start with Design: Use Figma designs as the source of truth
- Mobile First: Build mobile layouts first, then add responsive breakpoints
- Accessibility: Ensure accessibility during implementation, not as an afterthought
- Performance: Minimize JS, use CSS for animations when possible
- Progressive Enhancement: Ensure basic functionality works without JS
See Also