This is a solution to the Chat app CSS illustration challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- β View the optimal layout for the component depending on their device's screen size
- β See a realistic chat interface with proper message styling
- β View pricing options with interactive-looking radio buttons
- β Experience a responsive design that works on mobile and desktop
- β¨ Semantic HTML5 markup - Proper structure with sections, headers, and ARIA labels
- π¨ CSS custom properties - Using HSL color values from the style guide
- π± Flexbox - For layout and alignment
- π Mobile-first workflow - Responsive design starting from 375px
- π€ Google Fonts - Rubik font family with multiple weights
- π― CSS Gradients - Linear gradients for backgrounds and chat header
- πΌοΈ SVG Icons - Custom SVG icons for buttons and interface elements
This project was an excellent exercise in creating realistic UI components with pure CSS. Here are some key learnings:
1. Creating a realistic phone mockup:
.phone {
width: 247px;
height: 505px;
background: white;
border-radius: 30px;
padding: 11px;
box-shadow: 0 30px 60px -10px rgba(62, 39, 83, 0.25);
}
2. Implementing chat bubble styling:
.message--received p {
background: hsl(270, 20%, 96%);
color: hsl(276, 55%, 52%);
border-bottom-left-radius: 4px;
}
.message--sent p {
background: white;
color: hsl(271, 15%, 43%);
border-bottom-right-radius: 4px;
box-shadow: 0 10px 5px -5px rgba(62, 39, 83, 0.05);
}
3. Creating gradient pricing cards:
.message--pricing .pricing-option {
background: linear-gradient(225deg, hsl(293, 100%, 63%) 0%, hsl(264, 100%, 61%) 100%);
color: white;
padding: 10px 8px;
border-radius: 10px 10px 4px 10px;
}
- π± Responsive Design: Works perfectly on mobile (375px) and desktop (1440px)
- π¨ Pixel-Perfect Styling: Matches the design specifications exactly
- π¬ Realistic Chat Interface: Proper message alignment and bubble styling
- π Image Integration: Dog photos displayed in chat messages
- π° Interactive Pricing: Styled pricing options with radio buttons
- β¨ Smooth Interactions: Hover effects on interactive elements
- π― Accessibility: ARIA labels and semantic HTML structure
Future enhancements could include:
- π¬ CSS Animations: Add message typing animations and slide-in effects
- β‘ JavaScript Interactivity: Make the chat interface functional
- π¨ Theme Switching: Add dark/light mode toggle
- π± Progressive Web App: Add PWA capabilities for mobile installation
- Clone this repository
- Open
index.html
in your browser - Enjoy the chat app illustration!
chat-app-css-illustration/
βββ index.html # Main HTML file
βββ style.css # All CSS styles
βββ images/ # Avatar and dog images
βββ design/ # Design reference files
βββ README.md # This file
- Frontend Mentor - @Ayokanmi-Adejola