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.
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
🧰 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.
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.
.radius-4 / .rounded
.radius-8 / .rounded-2
.radius-16
.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)
Shadows
Shadows create depth and focus. Use them to separate elements from the background and emphasize important UI blocks like cards or modals.
🧩 Bootstrap Shadow Utilities
.shadow-sm
– subtle shadow.shadow
– default shadow.shadow-lg
– deep shadow.shadow-none
– removes shadow
Buttons
Buttons are key interactive elements. Use consistent colors, sizes, and spacing for clear user actions.
📏 Button Sizes
⚙️ Disabled & Block Buttons
Forms & Inputs
Forms are essential for collecting user input. Maintain consistency in field layout, spacing, and labels to ensure good usability.
✔️ Checkbox & Radio
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.
🧠 Use Cases
- Status indicators (e.g., Active)
- Unread messages (e.g., Inbox 5)
- Labels for categorization (e.g., UI Design)
Cards
Cards are flexible containers for grouping content. Use them to present content clearly, especially in grid layouts.
Card Title
Cards can hold titles, text, images, and links. Use padding and spacing for clean presentation.
Learn MoreDark 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.
Icons
Icons enhance UI clarity and improve usability. We use Bootstrap Icons for a consistent, scalable, and lightweight icon system.
<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.
.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
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.
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
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%);
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;
}
}
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 |
.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
Usage Tips:
z-index
only works on positioned elements (relative
,absolute
,fixed
, orsticky
).- 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 / section | 1–10 |
Sticky headers | 100 |
Dropdown menus | 500 |
Tooltips | 700 |
Modals & Overlays | 1000+ |
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.
Common Techniques
background-color: rgba(0, 0, 0, 0.5);
for semi-transparent black overlaybackdrop-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.
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.
Common Techniques
border-radius
— For circles, pills, and ovalsclip-path
— Create triangles, polygons, stars, and moretransform: 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:
- 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.
How to Implement:
- Use
position: absolute
orfixed
withtop/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