Product Design Style Guide

Standardized components, tokens, and patterns for UI/UX consistency.

Overview

Welcome to the Practyc Style Guide — a curated reference of design rules, reusable UI components, and frontend standards used across our platform. This guide is built for students, designers, and developers to understand and implement modern, scalable, and accessible web interfaces.

Whether you're working on a new feature or contributing to UI consistency, this document serves as your single source of truth. By following a shared design language, we ensure seamless collaboration between teams and better end-user experiences.

🎯 Core Objectives
  • Promote visual consistency across all UI components and pages
  • Improve design-to-development handoff using standardized tokens and components
  • Facilitate scalable, maintainable UI systems in real-world projects
  • Encourage learning-by-building with reusable examples
Visual Consistency

Use standardized font sizes, spacing units, and colors to unify the look and feel of the UI across components and pages.

Developer Efficiency

Utilize predefined styles, utility classes, and snippets to speed up coding, reduce bugs, and increase productivity in teams.

Scalability & Quality

Apply consistent, scalable design rules that help your product grow without compromising user experience or visual quality.

Typography

Typography plays a critical role in user interface design — ensuring readability, hierarchy, and brand consistency. We use a scalable type system with defined font sizes, weights, and spacing to achieve a clean and accessible UI.

📌 Font Family

Our primary font stack uses system fonts for performance and consistency:

font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
🔤 Font Sizes

These are our base font sizes used across headings and body text.

Element Font Size Example
h1 2.5rem / 40px

This is H1

h2 2rem / 32px

This is H2

h3 1.75rem / 28px

This is H3

h4 1.5rem / 24px

This is H4

h5 1.25rem / 20px
This is H5
h6 1rem / 16px
This is H6
body 1rem / 16px

This is body text

🏋️ Font Weights

Use weights to establish hierarchy and emphasis.

  • Light (300)
  • Regular (400)
  • Semi-Bold (600)
  • Bold (700)
📏 Line Height

Line heights improve text readability, especially for paragraphs:

line-height: 1.5

This is a paragraph with line-height: 1.5 which creates enough breathing space between lines for readability and clarity.

Colors

A consistent color palette is essential for visual harmony, brand recognition, and accessibility. Below is our primary color system used throughout the product.

🎯 Brand Colors
$primary
$secondary
$success
$danger
$warning
$info
🌓 Neutral Colors (Grayscale)
gray-100
gray-200
gray-300
gray-400
gray-500
gray-600
gray-700
gray-800
gray-900
📋 Text & Background Utilities

Use Bootstrap utility classes for quick text and background coloring:

  • .text-primary, .text-danger, etc.
  • .bg-primary, .bg-light, etc.
Student Tip: Ensure color contrast meets accessibility guidelines (WCAG 2.1). Use tools like WebAIM Contrast Checker.

Spacing & Layout

A consistent spacing system helps maintain visual balance and rhythm across the UI. We follow an 8pt Grid System — all spacing values are multiples of 8px (e.g., 8, 16, 24, 32...).

📏 Spacing Scale
8px
16px
24px
32px
48px
🧰 Bootstrap Utilities

Use Bootstrap’s spacing utility classes for margin and padding:

  • .m-2 → margin: 0.5rem (8px)
  • .p-3 → padding: 1rem (16px)
  • .my-4 → margin-top/bottom: 1.5rem (24px)
  • .px-5 → padding-left/right: 3rem (48px)
🧱 Layout Guidelines

Use consistent spacing between components and sections. Combine grid system with spacing classes for clean layout design.

.p-4 (padding)
.m-3 .p-3 (margin + padding)
Student Tip: Stick to multiples of 8px for cleaner design and better spacing harmony. Avoid arbitrary values like 13px or 27px.

Border Radius

Rounded corners help soften UI elements and improve visual hierarchy. We use a consistent set of border-radius tokens for buttons, cards, inputs, and other components.

4px

.radius-4 / .rounded

8px

.radius-8 / .rounded-2

16px

.radius-16

Pill

.radius-pill / .rounded-pill

📦 Bootstrap Radius Utilities
  • .rounded → default small rounding (≈ 4px)
  • .rounded-1 → slightly more rounding (≈ 6px)
  • .rounded-2 → medium rounding (≈ 8px)
  • .rounded-pill → full pill-shaped corners
  • .rounded-0 → no border-radius (square)
Student Tip: Use consistent radii across your product. Avoid mixing sharp and overly rounded elements in the same UI block.

Shadows

Shadows create depth and focus. Use them to separate elements from the background and emphasize important UI blocks like cards or modals.

.shadow-sm
.shadow
.shadow-lg
.shadow-none
🧩 Bootstrap Shadow Utilities
  • .shadow-sm – subtle shadow
  • .shadow – default shadow
  • .shadow-lg – deep shadow
  • .shadow-none – removes shadow
Student Tip: Avoid overusing shadows. Combine them with contrast and spacing to maintain clarity and clean design.

Buttons

Buttons are key interactive elements. Use consistent colors, sizes, and spacing for clear user actions.

📏 Button Sizes
⚙️ Disabled & Block Buttons
Student Tip: Always use semantic labels on buttons (e.g., "Submit", "Save", "Cancel") to improve accessibility and user understanding.

Forms & Inputs

Forms are essential for collecting user input. Maintain consistency in field layout, spacing, and labels to ensure good usability.

✔️ Checkbox & Radio
Student Tip: Use label elements for accessibility and always group related fields logically.

Badges & States

Badges are used to display statuses, counts, or labels. Use color-coded badges consistently to represent different types of information.

Primary Success Error Warning Info Secondary Dark
🧠 Use Cases
  • Status indicators (e.g., Active)
  • Unread messages (e.g., Inbox 5)
  • Labels for categorization (e.g., UI Design)
Student Tip: Keep badge colors meaningful and use sparingly to avoid clutter.

Cards

Cards are flexible containers for grouping content. Use them to present content clearly, especially in grid layouts.

Card Image
Card Title

Cards can hold titles, text, images, and links. Use padding and spacing for clean presentation.

Learn More
Dark Card

You can use color variants for card themes using Bootstrap background utility classes.

Bordered Card

Add colored borders to cards to signify status or match themes.

Student Tip: Keep content hierarchy clear within cards and avoid overloading with too much information.

Icons

Icons enhance UI clarity and improve usability. We use Bootstrap Icons for a consistent, scalable, and lightweight icon system.

Home
Search
Notifications
User
Student Tip: Use <i class="bi bi-icon-name"> and scale icons using fs-1 to fs-6 for font size.

Grid System

Bootstrap’s grid system uses a series of containers, rows, and columns to layout content responsively and consistently across devices.

col-4
col-4
col-4
col-6
col-6
Student Tip: Always wrap columns inside a .row and use col-sm-, col-md- etc. for responsiveness.

Components

Components are reusable UI blocks like buttons, alerts, modals, and tabs. Bootstrap provides dozens of prebuilt components to build responsive interfaces quickly.

Alerts

Tabs

Welcome to the Home tab.

This is the Profile tab content.

Here's how to Contact us.

Modal

Student Tip: All Bootstrap components work with simple classes. Learn how to customize them with data-bs-* attributes or JavaScript.

Glassmorphism

Glassmorphism is a modern UI trend that uses background blur and semi-transparent layers to create a frosted-glass effect.

Frosted Glass Example

This container demonstrates the glassmorphism effect. You can place content inside it.

Note: Glassmorphism works best on high-contrast backgrounds. Ensure backdrop-filter is supported.

Transitions & Animations

CSS transitions and animations add visual feedback to UI elements, making interactions feel more natural.

CSS Transition Example
CSS Animation Example
I bounce!
Use transitions for hover/focus interactions and animations for continuous or triggered effects.

Bonus Tricks

Here are some extra CSS tricks that improve interactivity and design quality.

  • Centering with Flexbox:
    display: flex; justify-content: center; align-items: center;
  • Custom Scrollbar:
    
            ::-webkit-scrollbar { width: 8px; }
            ::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }
                  
  • Clip-path shapes: Use CSS to make diagonal sections or creative shapes.
    
            clip-path: polygon(0 0, 100% 10%, 100% 100%, 0% 90%);
                  
Explore creative layouts with modern CSS features like aspect-ratio, scroll-snap, and container queries!

Dark Mode

Dark mode improves accessibility and is easier on the eyes in low-light environments.

Dark Mode Preview

This is how your content might look with a dark theme applied.

CSS Example:

        @media (prefers-color-scheme: dark) {
          body {
            background-color: #121212;
            color: #e0e0e0;
          }
        }
          
Use the prefers-color-scheme media query to detect user preference.

Responsive Guidelines

Responsiveness ensures your UI looks great on all devices. Bootstrap's responsive classes adapt layouts based on screen size breakpoints.

Breakpoint Class Prefix Device Width Range
Extra small .col- Mobile <576px
Small .col-sm- Tablets ≥576px
Medium .col-md- Small laptops ≥768px
Large .col-lg- Laptops ≥992px
Extra Large .col-xl- Desktops ≥1200px
Student Tip: Combine classes like .d-none d-md-block to show/hide elements based on screen sizes.

Z-Index & Layering

The z-index property in CSS controls the vertical stacking order of elements on the screen. Higher values appear on top of lower values, but it only works on elements with a position value other than static (e.g., relative, absolute, fixed, or sticky).

Example: Layered Boxes
z-index: 1
z-index: 3
z-index: 2
Usage Tips:
  • z-index only works on positioned elements (relative, absolute, fixed, or sticky).
  • Default z-index is auto, which places the element in the natural HTML stacking order.
  • When working in layers like modals or tooltips, use higher z-index to ensure visibility.
  • Be cautious with large z-index values—avoid conflicts by keeping consistent layering patterns (e.g., base: 1–100, overlays: 900+, modals: 1000+).
Common Z-Index Layering Examples
Component z-index
Base layout / section1–10
Sticky headers100
Dropdown menus500
Tooltips700
Modals & Overlays1000+

Overlays & Transparency

Overlays are semi-transparent layers placed above content, typically used in modals, banners, or image hover effects. They help highlight or dim background content.

Sample Image
Overlay Example
Common Techniques
  • background-color: rgba(0, 0, 0, 0.5); for semi-transparent black overlay
  • backdrop-filter: blur(5px); for modern glass blur overlays
  • .bg-opacity-50 (Bootstrap) for quick overlay background transparency

Hover Effects

Hover effects improve interactivity and feedback for users. You can apply them to buttons, images, cards, or any clickable UI component.

Hover Card
Zoom on Hover

Use transform scale for zoom effect.

Other Hover Tricks
  • :hover pseudo-class for CSS-based effects
  • Use transitions for smooth animations
  • Combine hover with overlays or tooltips

CSS Shapes

Create interesting and modern UI elements using just CSS. No images or SVGs needed.

Circle
Triangle
Semi
Common Techniques
  • border-radius — For circles, pills, and ovals
  • clip-path — Create triangles, polygons, stars, and more
  • transform: skew / rotate — Make parallelograms, diamonds

CSS Variables

CSS Variables (custom properties) allow you to define reusable values for colors, spacing, fonts, and more. They improve maintainability and consistency.

:root {
          --primary-color: #0d6efd;
          --spacing-md: 16px;
          --border-radius: 8px;
        }

Use them like this:

This box uses CSS variable for background color.
  • Define variables under :root for global access
  • Use var(--variable-name) inside CSS
  • Can be overridden at component or element level

Performance & Optimization

Efficient CSS practices improve load time, rendering speed, and overall user experience. Optimizing your styles helps scale your project without sacrificing speed.

Best Practices
  • Use minified CSS files in production (style.min.css)
  • Avoid deep CSS selectors (e.g. div ul li a span)
  • Combine and compress CSS files to reduce HTTP requests
  • Leverage utility classes and CSS variables
  • Use modern tools like PurgeCSS or UnCSS to remove unused styles

Fullscreen Background

Use fullscreen background images or videos for hero sections, landing pages, or immersive UI experiences.

Background Image

Fullscreen Hero Section

How to Implement:
  • Use position: absolute or fixed with top/left/right/bottom: 0
  • Ensure height: 100vh for full screen height
  • Use object-fit: cover to maintain aspect ratio

CSS Utilities

Utility classes are small, reusable classes that apply a single purpose style. They're great for speeding up development and reducing custom CSS.

Common Utility Examples:
  • .mt-3, .mb-4 — Margin top/bottom
  • .text-center — Center align text
  • .d-flex — Apply flex layout
  • .fw-bold — Make text bold
  • .rounded — Add border-radius
  • .shadow — Add box-shadow

This is a utility-based design block