Skip to main content
The VENCOL Front Template includes several reusable UI components for creating consistent, visually appealing interfaces with glassmorphism effects.

GlassCard

A versatile card component with glassmorphism styling and optional hover effects.

Features

  • Semi-transparent background with backdrop blur
  • Optional hover animations (scale, translate, shadow)
  • Flexible children composition
  • Custom className support
  • Consistent rounded corners and padding

Usage

Props

ReactNode
required
The content to be rendered inside the card
string
default:"''"
Additional CSS classes to apply to the card. These will be merged with the base classes.
boolean
default:"false"
Enable hover animations including scale, translate, and shadow effects

TypeScript Interface

Styling

The GlassCard applies the following base styles:

Hover Effect

When hoverEffect={true}, the card will:
  • Increase background opacity slightly
  • Translate upward by 4px (-translate-y-1)
  • Add a large shadow with green tint

Examples

Basic Card

Card with Hover Effect

Card with Custom Classes

Real-World Usage from Home Page

Component Location

components/ui/GlassCard.tsx:9

BackgroundBlobs

Decorative background component that adds animated gradient blobs for visual interest.

Features

  • Fixed positioning covering entire viewport
  • Non-interactive (pointer-events-none)
  • Multiple colored gradient spheres
  • Mix-blend modes for visual effects
  • Pulse animation on one blob
  • z-index 0 to stay behind content

Usage

Props

This component does not accept any props.

Implementation

Blob Details

The component renders three gradient blobs:

Blob 1 (Top-Left)

  • Color: Zinc gray with 20% opacity
  • Size: 384px × 384px (w-96 h-96)
  • Position: Top-left corner, offset by -50% in both directions
  • Effect: mix-blend-screen with 10-second pulse animation

Blob 2 (Bottom-Right)

  • Color: Brand green with 10% opacity
  • Size: 500px × 500px
  • Position: Bottom-right corner, offset by +33% in both directions
  • Effect: mix-blend-screen

Blob 3 (Center)

  • Color: Gray with 10% opacity
  • Size: 320px × 320px (w-80 h-80)
  • Position: Perfectly centered
  • Effect: mix-blend-overlay

Styling Classes

className
Custom class for styling individual blobs. Should be defined in your CSS with position: absolute and filter: blur().

CSS Requirements

You’ll need to define the .blob class in your global CSS:

Mix Blend Modes

  • mix-blend-screen: Brightens the background, useful for light-colored blobs
  • mix-blend-overlay: Combines multiply and screen based on background color

Z-Index Layering

The component uses z-0 to ensure it stays behind all content. Make sure your content has a higher z-index:

Pointer Events

The pointer-events-none class ensures the blobs don’t interfere with user interactions like clicking or hovering.

Animation

The first blob uses Tailwind’s animate-pulse with a custom duration:
This creates a slow, subtle pulsing effect over 10 seconds.

Component Location

components/ui/BackgroundBlobs.tsx:3

Design System Integration

Both UI components follow the VENCOL design system:

Color Palette

  • brand-green: Primary accent color (green)
  • brand-dark: Dark background color
  • glass-muted: Muted text color for secondary content
  • white/[opacity]: White with various opacity levels

Glass Effects

The glass-panel class provides the glassmorphism effect:

Common Patterns

  1. Responsive Spacing: Use Tailwind’s responsive utilities
  2. Smooth Transitions: transition-all duration-300
  3. Rounded Corners: rounded-2xl or rounded-3xl
  4. Subtle Borders: border-white/5 or border-white/10

Best Practices

  1. Use GlassCard for content containers - Provides consistent styling
  2. Enable hoverEffect on interactive cards - Improves user experience
  3. Place BackgroundBlobs at app root - Ensures consistent background
  4. Layer content with z-index - Keep content above decorative elements
  5. Combine with custom classes - GlassCard’s className prop allows customization