BackDesign System

Design System

Component library and design tokens. Click component names to copy import paths.

Accordion

Collapsible FAQ-style component with smooth expand/collapse animations. Uses Radix UI primitives. Each item has a subtle hover highlight in dark mode. Wrap in CursorGlow for interactive glow effects.

Accordion

Animated Icons (Lucide Animated)

Hover over icons to trigger animations. Use refs to control: iconRef.current?.startAnimation()

SVG Stroke Overlap Fix

Stroke-based SVG icons can show overlapping artifacts when using alpha transparency in colors. We've fixed this by using solid colors for --muted-foreground in globals.css.

Avoid for icons

className="text-foreground/50"

Alpha in color causes stroke overlap

Safe to use

className="text-muted-foreground"

Uses solid color (oklch 0.556)

BellIcon
HeartIcon
ZapIcon
RefreshCWIcon
CogIcon
WifiIcon
MoonIcon
DownloadIcon
CheckIcon
VolumeIcon
UserIcon
ArrowRightIcon
LockIcon
LockOpenIcon

Animation Components

Marquee

Item 1
Item 2
Item 3
Item 4
Item 1
Item 2
Item 3
Item 4
Item 1
Item 2
Item 3
Item 4
Item 1
Item 2
Item 3
Item 4

Ripple

Backgrounds

The unified background system used across landing pages. Combines gradients, animated grids, and decorative patterns.

Landing Background

LandingBackground

The primary wrapper component for all landing pages. Includes a subtle blue gradient and the interactive CursorGrid overlay.

Hover to see cursor spotlight + watch for blinking dots
<LandingBackground className="flex flex-col">
<SiteHeader />
<main>...</main>
<Footer />
</LandingBackground>

Cursor Grid (Interactive)

CursorGrid

The animated dot grid component with cursor-following spotlight, pulsing lines, and random blinking dots.

Move cursor here • Watch for emerald blinks

CursorGrid Features

Cursor Spotlight

300px radius glow follows mouse

Pulsing Lines

Emerald lines travel along grid paths

Blinking Dots

Random dots flash emerald every ~800ms

Grid Lines

40px spacing, visible near cursor

Blinking Dots Animation

Animation Phases:

  1. Flash (150ms) - Dot expands with emerald color
  2. Settle (300ms) - Bounces down to hold size
  3. Hold (800ms) - Stays emerald at 1.3x scale
  4. Deflate (600ms) - Fades back to grey

Behavior:

  • 3-8 random dots triggered every ~800ms
  • Each dot has random intensity (0.3-1.0)
  • Sparse rendering - only active dots update
  • Throttled to ~30fps for performance

Decorative Patterns

Static background patterns for cards, sections, or decorative use. Not used on landing pages (use LandingBackground instead).

DotPattern

Static dot grid

GridPattern

Static line grid

Usage Guidelines

LandingBackground: Home, Pricing, Projects, Experience, Contact, FAQ
DotPattern/GridPattern: Card backgrounds, empty states
Don't: Use LandingBackground on dashboard pages
Don't: Stack multiple animated backgrounds

BlurFade

BlurFade

Wraps content with fade-in + blur animation. Used on the landing page for staggered entrance animations. Scroll down in this preview area to trigger the animation.

First Element (delay: 0.1s)

Fades in with blur effect

Second Element (delay: 0.2s)

Staggered entrance animation

Third Element (delay: 0.3s)

Creates a cascading effect

DashboardButton

DashboardButton is for dashboard/admin contexts. For landing pages, use LandingButton instead.

Primary Green (CTA)

Our main CTA style: bg-emerald-600 hover:bg-emerald-700

DashboardButton Variants

LandingButton

Landing page CTA button with shimmer animation. Variants: default (black), primary (green), secondary (white/zinc).

default
primary
secondary

InteractiveHoverButton

Cards & Cursor Glow

Centralized card system for consistent styling across the application. Defined in lib/cards.ts. Shadow behavior: sm (default) → md (hover). Dark mode includes subtle emerald glow. Wrap cards in <CursorGlow> for interactive cursor-following glow effects. Use sparkle prop with SparkleProvider to enable twinkling sparkles.

Unified Card Color System

Each card variant has a single accent color that defines its border, shadow, CursorGlow, and sparkle colors. Use getCard(variant) to get all colors and classes at once. CARD_CTA is the only variant with white sparkles.

Interactive

Emerald sparkles

color: emerald

Featured

Emerald sparkles

color: emerald

CTA

White sparkles only

color: white (exception)

Crossed Corners

Emerald sparkles

color: emerald

Warning

Yellow sparkles

color: yellow

Destructive

Red sparkles

color: red

Card Color Reference

VariantColorSparkle
interactive, featured, crossed-cornersemeraldrgba(16, 185, 129, 0.9)
ctawhitewhite (only exception)
warningyellowrgba(234, 179, 8, 0.9)
destructiveredrgba(239, 68, 68, 0.9)

Cursor Glow Colors

The GLOW_COLORS constant provides a preset palette. Pass any HSL value for custom colors.

Emerald

GLOW_COLORS.emerald

Red

GLOW_COLORS.red

Orange

GLOW_COLORS.orange

Cyan

GLOW_COLORS.cyan

Purple

GLOW_COLORS.purple

Pink

GLOW_COLORS.pink

Amber

GLOW_COLORS.amber

Rose

GLOW_COLORS.rose

Blue

GLOW_COLORS.blue

CursorGlow Props

colorCSS color value or GLOW_COLORS.*. Default: emerald
sizeGlow radius in pixels. Default: 500
opacityBackground glow opacity (0-1). Default: 0.06
proximityDistanceDistance to start glowing. Default: 100px
disabledDisable the glow effect completely. Default: false
disabledInLightModeDisable glow in light mode only (dark mode still glows). Default: true

Usage Guidelines

Shadow Behavior

Cards use sm shadow by default, intensify to md on hover. Dark mode adds subtle emerald glow.

Glass vs Solid

Use glass cards on landing pages. Use solid cards in dashboard/admin contexts.

Matching Glow Colors

Match CursorGlow color to card's gradient background for cohesive feel.

Hover Opacity

Glass cards become more opaque on hover: white in light mode, brighter grey in dark mode.

Cards: import { CARD_INTERACTIVE_SOLID } from "@/lib/cards"

Glow: import { CursorGlow, GLOW_COLORS } from "@/components/ui/cursor-glow"

Colors

Uses OKLCH color space for perceptual uniformity. Defined in globals.css with light/dark mode variants. Many colors use alpha values (e.g., oklch(0 0 0 / 90%)).

Core

Background

bg-background

Foreground

text-foreground

Card

bg-card

Border

border-border

Brand & Actions

Brand

bg-brand

Primary

bg-primary

Secondary

bg-secondary

Destructive

bg-destructive

UI States

Muted

bg-muted

Accent

bg-accent

Popover

bg-popover

Ring

ring-ring

Chart Colors

Chart 1

--chart-1

Chart 2

--chart-2

Chart 3

--chart-3

Chart 4

--chart-4

Chart 5

--chart-5

Emerald Scale (Accent)

Primary accent color used for CTAs, links, and highlights.

50
100
200
300
400
500
600
700
800
900

Data Display

Card

Card Title
Card description text

Card content goes here.

Table

Sample data table
NameStatusAmount
Project AActive$250
Project BPending$150

Favicon

App favicon with JG logo on black background. Generated via app/icon.tsx and app/apple-icon.tsx.

Favicon (32x32)
Apple Touch Icon (180x180)
Preview (128x128)

Colors: Background #000000, Logo #34d399 (emerald-400)

Form Controls

Input

Textarea

Label

Switch

Checkbox

Slider

Badge

DefaultSecondaryOutline

StatusBadge

LeadIn ProgressCompleted

Layout Components

BentoGrid + BentoCard

Card 1

Description text

Card 2

Another card

3D Grid Logo - Rotating (Hero Version)

Rotating version with wireframe cube edges and grid texture on logo letters. Features crossfade effect to always show JG correctly (never reversed). Used as background with opacity-20 dark:opacity-15.

Static Logo (Header Version)

Flat CSS/SVG logo for headers - square border with JG inside. Lightweight (no 3D/Canvas). Size sm = 32x32px (h-8 w-8) is used in the dashboard header.

sm (header)
md
lg
xl
qa (preview size)

Media Components

BeforeAfterSlider

Editor Controls

Images cover the container (may crop)

Preview

Hover to control slider. Click/tap to go fullscreen.

After
Before
Before
After

Modals & Dialogs

Overlay components for user interactions, confirmations, and forms.

Dialog

AlertDialog

Drawer

OpenGraph Images

Dynamic OG images generated with Next.js ImageResponse. Each landing page has its own OG image.

ActiveProduct Engineer Landing Page

Home Page (Root)

app/opengraph-image.tsx
Home page OpenGraph preview
1200x630PNGOpen full size

Product Engineer Variant

landing-variants/product-engineer/
Product Engineer variant OpenGraph preview
1200x630PNGOpen full size
Inactive Landing Pages(Book a Project, Pricing)

Book a Project

landing-variants/book-a-project/
Book a Project OpenGraph preview
1200x630PNGOpen full size

Pricing Page

app/pricing/opengraph-image.tsx
Pricing page OpenGraph preview
1200x630PNGOpen full size

Test Your OG Images

Each platform caches images differently. Use these validators to debug and refresh cached previews.

Guidelines

  • Size: 1200x630px (1.91:1 aspect ratio) - optimal for all platforms
  • Safe zone: Keep text/logos away from edges (Facebook crops differently than Twitter)
  • Brand: Dark background with emerald accent, include JG logo
  • Cache: Social platforms cache aggressively - use validators above to force refresh
  • Facebook tip: Click "Scrape Again" in the debugger to refresh cached images

Section Header

Reusable section header component for landing pages. Supports two icon styles:cube (rotating 3D outline) and app (solid background). Five color variants available: emerald, red, yellow, blue, and muted.

Icon Styles

Cube Style (default)

Rotating Cube

3D rotating outline cube with icon centered inside

App Style

App Icon

Solid background with ring border

Color Variants (Cube Style)

emerald
red
yellow
blue
muted

Rotating Cube Icon Sizes

sm
md
lg

SectionHeader

Example Section

This is a subtitle that describes the section content

Shadows

Centralized shadow system for consistent elevation and glow effects. Defined in globals.css as CSS custom properties and exported from lib/shadows.ts for programmatic use.

Elevation

Used for floating/elevated UI elements like cards, headers, popovers. Darker in dark mode.

Small

--shadow-elevation-sm

Cards, containers

Medium

--shadow-elevation-md

Headers, toggles, project cards

Large

--shadow-elevation-lg

Modals, dialogs, hover states

Glow Effects

Used for CTAs and accent elements. Creates a colored glow effect around the element.

Emerald Glow

--shadow-glow-emerald

Primary CTAs (Contact, Live Site)

Emerald Glow (Hover)

--shadow-glow-emerald-hover

Hover state for primary CTAs

Usage Examples

Glass Container (Header/Toggle)

shadow-[0_8px_32px_rgba(0,0,0,0.12)] dark:shadow-[0_8px_32px_rgba(0,0,0,0.4)]

Project Card (Default)

shadow-[var(--shadow-elevation-md)]

Project Card (Hover)

shadow-[var(--shadow-elevation-lg)]

Primary CTA Button

shadow-[var(--shadow-glow-emerald)] hover:shadow-[var(--shadow-glow-emerald-hover)]

Import: import { shadowClasses } from "@/lib/shadows"

Component Sources

shadcn/ui →

Base components built on Radix UI primitives. Button, Dialog, Select, Accordion, etc.

Magic UI →

Animated components. Marquee, Ripple, BlurFade, BentoGrid, AnimatedGradientText, etc.

Lucide Icons →

Icon library with 1000+ icons. Some wrapped with animation via custom components.

Custom

CursorGrid, BeforeAfterSlider, Logo3D, ExperienceTimeline, LandingButton, etc.

Styling: Tailwind CSS v4Animation: Framer Motion3D: React Three Fiber + DreiNumbers: @number-flow/reactGlow: CursorGlow (custom)

Typography

Font stack using Geist Sans and Geist Mono from Vercel. Defined in app/layout.tsx.

Geist Sans

font-sans

Primary typeface for all UI text.

The quick brown fox

The quick brown fox jumps over

The quick brown fox jumps over the lazy dog

ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789

Geist Mono

font-mono

Monospace for code, data, and technical content.

The quick brown fox

The quick brown fox jumps over

The quick brown fox jumps over the lazy dog

ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789

Type Scale & Hierarchy

text-5xlPage Title
text-4xlSection Header
text-2xlCard Title
text-xlSubsection Title
text-lgLead Paragraph
text-baseBody text - default size for paragraphs and UI elements
text-smSecondary text, captions, and metadata
text-xsLabels, badges, and fine print

Font Weights

Regular (400)Medium (500)Semibold (600)Bold (700)

Use tracking-tight (-0.025em) for large headlines. Default tracking for body text.

Hero Section

Animated text components for the hero headline. Cycles through rotating words with smooth transitions. Inspired by Aceternity UI.

Rotating Words

Words cycle in this order (defined in home-client.tsx):

  1. new — Fresh start, new beginnings
  2. fast — Speed & performance
  3. beautiful — Visual design & aesthetics
  4. modern — Current tech & trends
  5. custom — Tailored solutions

Interval: 2500ms between transitions

ContainerTextFlip (Current)

Need a new website?

FlipWords (Previous)

Need a new website?

ContainerTextFlip Props

PropTypeDefaultDescription
wordsstring[]["better", ...]Array of words to cycle through
intervalnumber3000Time in ms between transitions
classNamestring-CSS classes for the container
textClassNamestring-CSS classes for the text
animationDurationnumber700Animation duration in ms

Code Example

<h1 className="text-4xl font-bold">
  Need a{" "}
  <ContainerTextFlip
    words={["new", "fast", "beautiful", "modern", "custom"]}
    interval={2500}
    textClassName="font-bold"
  />
  {" "}website?
</h1>

Image Upload

A polished image upload component with drag-and-drop, file picker, and URL input modes. Features preview with remove button, loading states, and error handling.

ImageUpload (Empty)

Drop an image here, or click to browse

PNG, JPG, GIF up to 5MB

Supports PNG, JPG, GIF up to 5MB

ImageUpload (With Image)

Uploaded image

Hover to reveal remove button

ImageUpload Props

PropTypeDefaultDescription
valuestring | null-Current image URL
onChange(url: string | null) => void-Called when image changes
uploadEndpointstring/api/uploadAPI endpoint for file uploads
storagePathstringimagesFolder path in storage bucket
aspectRatiostring16/10Preview aspect ratio
maxSizenumber5MBMax file size in bytes
allowUrlbooleantrueShow URL input tab
labelstring-Label text above upload area

Typography Components

AnimatedGradientText

Gradient Text

Usage Notes

  • All UI components are in components/ui/
  • Custom page components are in components/
  • Colors use OKLCH format in globals.css
  • Use semantic tokens: bg-background, text-foreground, border-border
  • Accent color is green: hsl(145, 80%, 45%) or text-emerald-500
  • Glow effects via CursorGlow component
  • Number animations via @number-flow/react
  • Icon transparency: Use opacity-50 not text-foreground/50 to avoid stroke overlap