Tutorial: Build Your First Landing Page
Learn Vanilla Breeze step by step. In this tutorial, you will build a complete landing page from scratch, mastering layout primitives, design tokens, forms, and interactive components along the way.
1. Introduction and Philosophy
Before we write any code, let us understand what makes Vanilla Breeze different from other CSS frameworks.
What We Will Build
By the end of this tutorial, you will have built a complete landing page with:
- A hero section with a call-to-action
- A responsive features grid
- Styled cards with proper elevation
- Navigation with multiple styles
- A contact form with validation
- An interactive FAQ accordion
The Vanilla Breeze Philosophy
HTML-First
Start with semantic HTML5 elements. Your page works before any CSS loads.
Progressive Enhancement
Add CSS for styling, JavaScript for interactivity. Each layer is optional.
Zero Dependencies
No build tools required. Link a CSS file and you are ready to go.
Composition Over Configuration
Combine simple layout primitives to build complex interfaces.
2. Setting Up the Project
Let us create our project structure and link the Vanilla Breeze stylesheet.
File Structure
Create a new folder for your project with this structure:
index.html
That is it. No node_modules, no build configuration, no package.json required.
The Minimal HTML Document
Create your index.html file with this starting template:
Open this file in your browser and you will see styled typography immediately.
Hello, Vanilla Breeze!
Your page is ready.
3. Page Structure with Semantic HTML
Every good webpage starts with a solid semantic structure. Vanilla Breeze styles these elements automatically.
The Three-Part Layout
Most landing pages follow a simple pattern: header, main content, and footer.
Milestone 1 Complete
You have a structured HTML page with semantic elements. Even without custom styles, it is readable and functional.
4. Design Tokens and Theming
Vanilla Breeze uses CSS custom properties (design tokens) for consistent spacing, colors, and typography.
The Token System
Spacing (T-shirt Sizes)
Colors (Semantic)
Using Tokens in Your CSS
5. Building the Hero Section
Now let us create an impactful hero section using layout-stack and layout-cluster.
Milestone 2 Complete
Your hero section is responsive and uses layout primitives. The buttons are styled automatically.
6. Creating a Features Grid
Display your product features in a responsive grid that adapts to any screen size.
The data-min attribute sets the minimum width of each column. The grid calculates how many columns fit automatically.
Everything You Need
Lightning Fast
Built for speed.
Secure
Enterprise-grade.
Collaborate
Work together.
data-layout-min="15rem" attribute means each column must be at least 15rem wide. As the viewport shrinks, columns automatically reflow.
7. Building Card Components
Cards are a fundamental UI pattern. Vanilla Breeze provides a layout-card element with built-in variants.
Card Data Attributes
| Attribute | Values | Description |
|---|---|---|
data-variant |
elevated, outlined, ghost |
Visual style variant |
data-padding |
none, s, m, l, xl |
Internal padding amount |
9. Forms and Inputs
Vanilla Breeze styles all native form elements automatically.
10. Adding Interactivity
For interactive components, Vanilla Breeze provides Web Components. Let us add an FAQ accordion.
Including JavaScript
The Accordion Component
How do I get started?
Getting started is easy! Sign up for a free account, and you will be guided through our onboarding process. No credit card required.
Can I cancel anytime?
Yes, you can cancel your subscription at any time. There are no long-term contracts or cancellation fees.
Milestone 3 Complete
Your landing page now has interactive elements that work with keyboard and screen readers.
11. Responsive and Accessible
Vanilla Breeze is designed to be responsive and accessible by default.
Built-in Responsiveness
The layout primitives are inherently responsive:
- layout-grid: Automatically adjusts columns based on
data-min - layout-cluster: Wraps items naturally when space runs out
- layout-stack: Works at any width
- layout-sidebar: Stacks on narrow viewports
Accessibility Checklist
- Use semantic HTML elements (
<nav>,<main>,<section>) - Add
aria-labelto navigation landmarks - Use
aria-current="page"for current navigation items - Include
alttext for images - Ensure form fields have associated
<label>elements
12. Next Steps and Resources
Congratulations! You have built a complete landing page. Here is where to go next.
Explore More
Design Tokens
Deep dive into colors, spacing, typography, and shadows.
All Elements
Browse all 84 native, 15 custom, and 9 web components.
Kitchen Sink
See every component in action on a single page.
Copy-Paste Snippets
Ready-to-use patterns for common UI needs.
Community and Support
- GitHub Repository - Star the project, report issues
- GitHub Discussions - Ask questions, share ideas
Tutorial Complete!
You have learned the core concepts of Vanilla Breeze. Now go build something amazing with simple, elegant markup.