Design System Overview
Interface X uses a comprehensive design system built on Tailwind CSS to provide consistent, themeable components for commerce search and discovery experiences.Architecture
The design system consists of several layers:Core Theme
The theme defines design tokens for colors, typography, spacing, and other visual properties. All theme values are accessible through thetheme('x.*') helper in component styles.
/home/daytona/workspace/source/packages/x-tailwindcss/src/x-tailwind-plugin/theme.ts:1
Component Styles
Components are built using utility-first CSS with pre-configured styles. Each component:- Has a base class (e.g.,
.x-button,.x-suggestion) - Supports modifiers for variants (e.g.,
.x-button-outlined,.x-button-ghost) - Uses CSS custom properties for theming
- Responds to the
x-selectedvariant
/home/daytona/workspace/source/packages/x-tailwindcss/src/x-tailwind-plugin/components/button/default.ts:1
Available Components
The design system includes pre-styled components for:Interactive Elements
- Buttons (default, outlined, ghost, link)
- Input fields and groups
- Tags and badges
- Facet filters
Content Display
- Pictures with aspect ratios
- Typography styles
- Highlight components
- Progress bars
Layout Components
- Layouts with max-width constraints
- Scroll containers
- Sliding panels
- Button groups
Search Components
- Suggestions and suggestion groups
- Query highlighting
- Attach components
- Icons
Design Tokens
Color System
Colors are organized into semantic categories with tint levels (25, 50, 75):- Neutral: Primary grayscale palette
- Lead: Primary brand color
- Auxiliary: Secondary brand color
- Accent: Accent color for emphasis
- Highlight: Alternative highlight color
- Success: Success states
- Warning: Warning states
- Error: Error states
Typography
Four font families are available:main: Inter, sans-serif (default)alternative: Lora, serifextra: Poppins, sans-serifspecial: Bree Serif, serif
xxs (10px) to 8xl (96px).
Spacing Scale
The spacing scale uses a combination of small increments (1px, 2px, 4px) and a base-8 system (8px, 16px, 24px…) up to 512px.Responsive Breakpoints
CSS Custom Properties
Components use CSS custom properties to enable runtime theming:Next Steps
Tailwind Plugin
Install and configure the x-tailwindcss plugin
Customization
Learn how to customize the design system
