Design a responsive UI kit with Beercss, focusing on mobile-first design.
- User
Design a responsive UI kit with Beercss, focusing on mobile-first design.
- Assistant
Designing a responsive UI kit
I'm focusing on creating a responsive UI kit using BeerCSS, emphasizing a mobile-first approach. BeerCSS is a lightweight framework similar to Material Design, featuring components based on HTML classes and Material Icons. The user likely wants guidelines, layouts, components, and code examples. I plan to develop a template comprising navigation elements, cards, buttons, forms, lists, and modals. To ensure responsiveness, I’ll utilize BeerCSS grid classes like .row, .s12, .m6. It seems BeerCSS draws inspiration from frameworks like MaterializeCSS, so I want to verify my assumptions.Verifying assumptions about BeerCSS
I should check my assumptions about BeerCSS, but since I can’t browse, I’ll stick to what I know. It's based on CSS custom properties and uses classes like "responsive", "fill", "round", and "border". Their documentation shows button tags with classes like "primary" and "round." The layout includes "container", "row", and "col s12 m6 l4," which feels similar to Materialize. Given the focus on mobile-first design, I plan to start with small screen layouts and include breakpoints for larger screens. The user expects a UI kit structure with typography, color systems, and component code, so I’ll ensure to keep things general but informative.Structuring design tokens and components
I’m planning to create design tokens for color palettes, spacing, typography, elevation, and radius, using CSS custom properties that align with BeerCSS tokens.
For the layout grid, I’ll show how to make a responsive card list: a single column on mobile, two columns on tablets, and three to four columns on desktop.
My components will include app structure, like an app bar and bottom navigation for mobile, buttons (primary, secondary, full-width), responsive product cards, form controls, navigation lists, and utility classes. I need to focus on using BeerCSS classes and provide sample HTML while noting that JavaScript handling is minimal, just for toggling components.Referencing BeerCSS markup examples
I’m looking at examples showing how to include BeerCSS styles and scripts, like linking to the stylesheet and script from a CDN. The component markup includes a fixed header with a navigation button and a title, and a responsive main section.
There's a drawer structure and a bottom navigation bar, though I may not know the exact classes. I should be cautious and approximate without making up facts, so I’ll encourage verifying class names while highlighting that these should match BeerCSS documentation. I’m confident about the CDN URLs and some markup but won’t claim exact versions.Planning the UI kit with BeerCSS
I’m gathering my thoughts on creating a UI kit using BeerCSS, which I see as Material You for the web. First, I’ll include the necessary scripts and styles from the CDN, along with Google Fonts for Material Symbols. I’ll detail components like buttons, text fields, selects, and cards using example markup to illustrate how they might be structured.
I’ll focus on creating a design spec that includes tokens for colors and typography while noting that BeerCSS uses CSS variables like --primary. I can establish a UI kit structure emphasizing mobile-first design with a layout that supports various screen sizes.
I will outline sections for setup, theme tokens, layout primitives, and core components, each containing HTML snippets to help visualize the design. I'll be cautious about any JavaScript attributes, providing guidance for toggling components while encouraging users to check the current documentation. Below is a mobile‑first UI kit structure you can use with BeerCSS. It’s organized as:
- Base setup (HTML & imports)
- Theme tokens (colors, typography, spacing)
- Layout primitives (containers, grid)
- Core components (navigation, buttons, cards, forms, dialogs)
Use this as a “kitchen sink” page or as a design system reference.
1. Base setup (mobile‑first)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>BeerCSS Mobile‑First UI Kit</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- BeerCSS (verify URLs in current docs) --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/beercss@latest/dist/cdn/beer.min.css" /> <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@latest/dist/cdn/beer.min.js"> </script> <!-- Material Icons (if needed) --> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" /> <!-- Custom theme tokens for the kit --> <style> :root { /* Colors – Material 3 inspired */ --primary: #6750a4; --on-primary: #ffffff; --primary-container:#eaddff; --on-primary-cont: #21005d; --secondary: #625b71; --on-secondary: #ffffff; --secondary-container:#e8def8; --on-secondary-cont: #1d192b; --surface: #fffbfe; --on-surface: #1c1b1f; --surface-variant: #e7e0ec; --on-surface-var: #49454f; --error: #b3261e; --on-error: #ffffff; /* Elevation / Radius */ --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 24px; /* Spacing scale (multiples of 4) */ --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; /* Typography (adjust to your fonts) */ --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --font-size-body: 0.95rem; --font-size-label: 0.8rem; --font-size-title: 1.1rem; } body { font-family: var(--font-family); font-size: var(--font-size-body); background: var(--surface); color: var(--on-surface); } /* Layout helpers for this kit */ .kit-section { padding: var(--space-4); max-width: 1200px; margin: 0 auto; } .kit-section h2 { margin-bottom: var(--space-3); } .kit-grid { margin-top: var(--space-3); } .kit-swatch { border-radius: var(--radius-sm); padding: var(--space-3); color: #fff; display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); } .kit-swatch span { font-size: 0.8rem; opacity: 0.9; } </style> </head> <body class="responsive">
2. Theme tokens preview
Show your design tokens as components so designers/devs can see them.
<section class="kit-section"> <h2>Theme Tokens</h2> <div class="row kit-grid"> <!-- Colors --> <div class="col s12 m6"> <h3>Colors</h3> <div class="kit-swatch" style="background: var(--primary);"> <strong>Primary</strong><span>#6750A4</span> </div> <div class="kit-swatch" style="background: var(--secondary);"> <strong>Secondary</strong><span>#625B71</span> </div> <div class="kit-swatch" style="background: var(--error);"> <strong>Error</strong><span>#B3261E</span> </div> <div class="kit-swatch" style="background: var(--surface-variant); color: var(--on-surface-var);"> <strong>Surface Variant</strong><span>#E7E0EC</span> </div> </div> <!-- Typography --> <div class="col s12 m6"> <h3>Typography</h3> <p style="font-size: var(--font-size-title); font-weight: 600;"> Title / Heading </p> <p> Body text – used for most content. This should be comfortable to read on small screens. Keep line-length to 45–70 characters on mobile where possible. </p> <p style="font-size: var(--font-size-label); text-transform: uppercase; letter-spacing: .08em;"> Label text – for buttons, chips, and field labels. </p> </div> </div> </section>Notes:
row,col,s12,m6are common grid conventions. If your BeerCSS version uses different grid classes, adapt those to match its documentation.- On mobile (default), everything stacks (
s12), tablet (m6) splits into 2 columns.
3. Layout primitives (containers & grid)
Mobile-first: start as a single column; enhance at
m/lbreakpoints.<section class="kit-section"> <h2>Layout</h2> <div class="card border"> <div class="content"> <h3>Container + Grid</h3> <p> Layout is mobile-first: single-column by default, then multi-column using grid classes at tablet/desktop sizes. </p> </div> </div> <div class="row kit-grid"> <article class="col s12 m6 l4"> <div class="card border"> <div class="content"> <h4>Block A</h4> <p>Full-width on phones; half-width on tablets; third on desktop.</p> </div> </div> </article> <article class="col s12 m6 l4"> <div class="card border"> <div class="content"> <h4>Block B</h4> <p>Use for cards, modules, etc.</p> </div> </div> </article> <article class="col s12 m6 l4"> <div class="card border"> <div class="content"> <h4>Block C</h4> <p>Breakpoints can be adjusted per your BeerCSS grid system.</p> </div> </div> </article> </div> </section>
4. Navigation (app bar, drawer, bottom nav)
4.1 Mobile app bar + bottom navigation
On phones: fixed top app bar + bottom bar. On larger screens: consider hiding the bottom bar and using a side rail/drawer.
<header class="fixed surface"> <nav class="no-space"> <button class="circle transparent" data-ui="#app-drawer"> <i class="material-symbols-outlined">menu</i> </button> <h5>App Title</h5> <span class="max"></span> <button class="circle transparent"> <i class="material-symbols-outlined">search</i> </button> </nav> </header> <!-- Navigation drawer (left) --> <aside id="app-drawer" class="drawer left"> <nav> <a class="active"> <i class="material-symbols-outlined">home</i> <span>Home</span> </a> <a> <i class="material-symbols-outlined">favorite</i> <span>Favorites</span> </a> <a> <i class="material-symbols-outlined">settings</i> <span>Settings</span> </a> </nav> </aside> <!-- Bottom navigation (mobile) --> <nav class="bottom surface"> <a class="active"> <i class="material-symbols-outlined">home</i> <span>Home</span> </a> <a> <i class="material-symbols-outlined">search</i> <span>Search</span> </a> <a> <i class="material-symbols-outlined">person</i> <span>Profile</span> </a> </nav>Notes:
data-ui="#app-drawer"is the pattern BeerCSS has used for toggling drawers/sheets; confirm with your version.- Keep icons + labels visible on mobile; do not rely on icons only for primary navigation.
5. Buttons & FAB
Design a small consistent set: Primary, Secondary, Tertiary/Text, Icon, FAB (floating action button).
<section class="kit-section"> <h2>Buttons</h2> <div class="row kit-grid"> <div class="col s12 m6"> <h3>Primary actions</h3> <button class="primary"> Primary </button> <button class="primary round"> Rounded primary </button> <button class="primary fill"> Full-width primary (mobile) </button> </div> <div class="col s12 m6"> <h3>Secondary / Text</h3> <button class="secondary"> Secondary </button> <button class="border"> Outlined </button> <button class="transparent"> Text button </button> <button class="circle"> <i class="material-symbols-outlined">more_vert</i> </button> </div> </div> <!-- Floating Action Button (FAB) – mobile primary action --> <button class="fab primary" style="position: fixed; right: 16px; bottom: 72px;" > <i class="material-symbols-outlined">add</i> </button> </section>Guidelines:
- On small screens, prefer
fill(full-width) for important actions. - Limit primary actions per screen (1 prominent, maybe 1 secondary).
- FAB should be used for a single, dominant action (e.g., “New”).
6. Cards & content blocks
Cards are your main mobile content block: lists, product tiles, etc.
<section class="kit-section"> <h2>Cards</h2> <div class="row kit-grid"> <article class="col s12 m6 l4"> <div class="card border"> <img src="https://via.placeholder.com/400x240" alt="Placeholder" class="responsive" /> <div class="content"> <h4>Media Card</h4> <p>Use for products, articles, or featured content.</p> <button class="primary">View</button> </div> </div> </article> <article class="col s12 m6 l4"> <div class="card border"> <div class="content"> <h4>Compact Card</h4> <p>Use without images for dense information.</p> <div class="row"> <button class="border">Dismiss</button> <span class="max"></span> <button class="primary">Accept</button> </div> </div> </div> </article> <article class="col s12 m6 l4"> <div class="card border"> <div class="content"> <h4>Stat Card</h4> <p style="font-size: 1.6rem; font-weight: 600;">42</p> <p>Completed tasks</p> </div> </div> </article> </div> </section>
7. Forms (mobile‑friendly fields)
Mobile-first forms: big touch targets, labels always visible, avoid horizontal space reliance.
<section class="kit-section"> <h2>Forms</h2> <form class="row kit-grid"> <div class="col s12"> <div class="field label border"> <input type="text" required /> <label>Full name</label> </div> </div> <div class="col s12"> <div class="field label border"> <input type="email" required /> <label>Email</label> </div> </div> <div class="col s12 m6"> <div class="field label border"> <input type="password" required /> <label>Password</label> </div> </div> <div class="col s12 m6"> <div class="field label border"> <input type="password" required /> <label>Confirm password</label> </div> </div> <div class="col s12"> <div class="field label border"> <select> <option value="" disabled selected>Choose a role</option> <option>User</option> <option>Admin</option> </select> <label>Role</label> </div> </div> <div class="col s12"> <label class="row middle"> <input type="checkbox" /> <span style="margin-left: 8px;">I agree to the terms</span> </label> </div> <div class="col s12"> <button class="primary fill">Create account</button> </div> </form> </section>Tips:
- Keep forms single-column on mobile (
s12); only split into columns atmbreakpoints for short fields (e.g., first/last name). - Use
fillon the main submit button for easy reachability.
8. Lists & item patterns
Navigation lists, settings, or data rows.
<section class="kit-section"> <h2>Lists</h2> <div class="card border"> <nav class="list"> <a> <i class="material-symbols-outlined">account_circle</i> <div> <div>Profile</div> <small>View and edit your profile</small> </div> <span class="max"></span> <i class="material-symbols-outlined">chevron_right</i> </a> <a> <i class="material-symbols-outlined">notifications</i> <div> <div>Notifications</div> <small>Push, email, SMS</small> </div> <span class="max"></span> <span class="chip small">3</span> </a> <a> <i class="material-symbols-outlined">dark_mode</i> <div> <div>Appearance</div> <small>Theme & display</small> </div> </a> </nav> </div> </section>Use consistent list layouts for:
- Settings screens
- “Choose item” views
- Recent activity or messages
9. Chips & filters
Chips are ideal for filters and quick actions on mobile.
<section class="kit-section"> <h2>Chips & Filters</h2> <div class="row nowrap" style="overflow-x: auto; gap: 8px;"> <button class="chip primary">All</button> <button class="chip border">Work</button> <button class="chip border">Personal</button> <button class="chip border"> <i class="material-symbols-outlined">add</i> New </button> </div> </section>Design guidance:
- Use horizontal scroll on chips rows for categories when space is tight.
- Keep label text short for tap accuracy.
10. Dialogs & sheets (mobile‑first patterns)
On mobile, favor bottom sheets for transient tasks; modals for confirmations.
<section class="kit-section"> <h2>Dialogs & Sheets</h2> <button class="border" data-ui="#sheet-example"> Open bottom sheet </button> <button class="border" data-ui="#dialog-example"> Open dialog </button> <!-- Bottom Sheet --> <article id="sheet-example" class="sheet bottom"> <header> <h5>Sort by</h5> </header> <nav> <a>Newest first</a> <a>Oldest first</a> <a>Most popular</a> </nav> </article> <!-- Modal Dialog --> <article id="dialog-example" class="dialog"> <header> <h5>Delete item?</h5> </header> <div class="content"> <p>This action can’t be undone.</p> </div> <footer> <button class="border" data-ui="#dialog-example">Cancel</button> <button class="primary" data-ui="#dialog-example">Delete</button> </footer> </article> </section>Again, confirm the exact
sheet,dialog, anddata-uiAPIs in your BeerCSS version; the pattern above matches how it has commonly been used.
11. Bringing it together: page structure
Wrap everything in
<main>so that the header and bottom nav are fixed while content scrolls.<main style="padding-top: 64px; padding-bottom: 72px;"> <!-- Insert sections from above here: Theme tokens, Layout, Navigation demos, Buttons, Cards, Forms, etc. --> </main> </body> </html>
How to grow this UI kit
- Add documentation for:
- Spacing rules (e.g., 16px padding on screen edges, 8px between controls).
- Recommended icon sizes and hit areas (at least 44x44 px).
- Usage guidelines for each component (when to use cards vs lists, dialogs vs sheets).
- Refine and centralize tokens:
- Expose them in a dedicated “Design tokens” section so designers can copy them.
- Create variants:
- Light/dark theme toggles (swap
:rootcustom properties). - Density variants for desktop (slightly tighter spacing, larger max widths).
- Light/dark theme toggles (swap
This structure gives you a mobile‑first, BeerCSS-based UI kit that can serve as both a live style guide and a component library for your app.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.