Overview
When creating screen designs in Design OS, all components must follow specific technical requirements to ensure they’re production-ready, portable, and work across different environments and devices.These requirements apply to screen designs and components you create with Design OS, not to the Design OS application itself.
Tailwind CSS v4 Requirements
Design OS uses Tailwind CSS v4 exclusively. This version has significant differences from v3.No tailwind.config.js
Tailwind CSS v4 does not use a configuration file. Do NOT:- Create a
tailwind.config.jsfile - Reference
tailwind.config.jsin documentation or prompts - Attempt to configure Tailwind via a config file
- Use CSS custom properties for theming
- Use built-in utility classes
- Configure via Vite plugin if needed
Use Built-in Utility Classes
Avoid writing custom CSS. Stick to Tailwind’s built-in utility classes.Good vs. Bad Examples
Good vs. Bad Examples
Bad - Custom CSS:Good - Tailwind utilities:
Use Built-in Colors
Do not define custom colors. Use Tailwind’s built-in color palette. Available palettes:- slate, gray, zinc, neutral, stone
- red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
Responsive Design Requirements
All screen designs must be fully responsive and work across all device sizes.Use Responsive Prefixes
Tailwind provides responsive breakpoints:- Base classes — Apply to all screen sizes (mobile-first)
sm:— 640px and up (large phones, small tablets)md:— 768px and up (tablets)lg:— 1024px and up (laptops, small desktops)xl:— 1280px and up (large desktops)
Mobile-First Approach
Start with mobile layout (base classes), then add larger screen variants:Common Responsive Patterns
Layout Grid
Layout Grid
Flex Container
Flex Container
Typography Scaling
Typography Scaling
Padding & Spacing
Padding & Spacing
Testing Responsive Designs
- Resize browser window — Manually resize to test breakpoints
- Use DevTools device toolbar — Test different device sizes
- Test on real devices — When possible, verify on actual phones/tablets
Dark Mode Requirements
All screen designs must support both light and dark modes with full functionality and readability in both.Use dark: Variants
Every color must have adark: variant:
Complete Example
Card with Dark Mode Support
Card with Dark Mode Support
Common Dark Mode Patterns
Neutral backgrounds:Testing Dark Mode
- Toggle system dark mode — Change OS appearance settings
- Use browser DevTools — Add/remove
darkclass on<html>element - Verify all elements — Check backgrounds, text, borders, icons
- Check contrast — Ensure text is readable in both modes
Design Tokens
When design tokens are defined via/design-tokens, use them consistently across all screen designs.
Color Palettes
Design tokens define three color palettes:- Primary — Main brand color (e.g., lime)
- Secondary — Accent color (e.g., blue)
- Neutral — Gray scale (e.g., stone)
Usage Examples
Typography
Design tokens define three font families:- Heading — For titles and headings
- Body — For body text and UI
- Mono — For code and monospace text
Design OS UI vs. Product Design:
- Design OS application always uses stone/lime and DM Sans
- Your product screen designs use the design tokens you define
- The shell uses product design tokens to preview the full app experience
Component Architecture
Props-Based Components
All screen design components must be props-based and never import data directly.Good vs. Bad Examples
Good vs. Bad Examples
Bad - Imports data directly:Good - Accepts data via props:
Why Props-Based?
Props-based components are:- Portable — Can be dropped into any React app
- Testable — Easy to test with different data
- Flexible — Work with any data source (API, database, static)
- Reusable — Can be used in multiple contexts
Callbacks for User Actions
Components should accept callback functions for user interactions:Preview Wrappers
Preview wrappers (insrc/sections/[section-name]/[ViewName].tsx) can import data to pass to components:
No Navigation in Section Screens
Section screen designs should not include navigation chrome like headers, sidebars, or menus.What Belongs in Sections
- Feature-specific UI and content
- Data displays (tables, cards, lists)
- Forms and input controls
- Filters and search
- Modals and dialogs
- Feature-specific actions and buttons
What Belongs in Shell
- Main navigation menu
- User menu and profile
- Global search
- Notifications
- Application header/footer
- Persistent layout structure
Empty States
All screen designs should include proper empty states.What is an Empty State?
The UI shown when there’s no data to display—like a first-time user’s experience.Good Empty States Include
- Clear explanation — Tell users what would go here
- Call to action — Button or link to create first item
- Visual element — Icon or illustration (optional)
- Helpful context — Why this section is useful
Empty State Example
Empty State Example
Accessibility
While not strictly enforced, consider basic accessibility:- Use semantic HTML elements (
button,nav,header,main) - Provide alt text for images
- Ensure sufficient color contrast
- Use focus styles for keyboard navigation
- Add
aria-labelfor icon-only buttons
Summary Checklist
Before exporting, verify your screen designs meet all requirements:- Uses Tailwind CSS v4 (no tailwind.config.js)
- Uses only built-in Tailwind utilities and colors
- Fully responsive with mobile-first approach
- Supports both light and dark modes
- Uses design tokens consistently
- Components are props-based (no direct data imports)
- Accepts callbacks for user interactions
- No navigation chrome in section components
- Includes proper empty states
- Uses semantic HTML where possible