|
| 1 | +--- |
| 2 | +name: beautiful-ui |
| 3 | +description: > |
| 4 | + Beautiful UI patterns for modern web development — semantic HTML, accessible markup, responsive design, typography, |
| 5 | + and form UX. Use this skill when building page layouts, structuring content, choosing semantic elements, implementing |
| 6 | + navigation, building forms, creating data tables, handling accessibility, designing responsive layouts, establishing |
| 7 | + typographic hierarchy, or any markup and styling that should be meaningful, accessible, and well-structured. |
| 8 | + Works with React, Vue, and Svelte with Tailwind CSS. |
| 9 | +metadata: |
| 10 | + author: sailscastshq |
| 11 | + version: '1.0.0' |
| 12 | + tags: beautiful-ui, semantic-html, accessibility, a11y, responsive, typography, form-ux, landmarks, aria, navigation, forms, tables, headings, tailwind, mobile-first, container-queries |
| 13 | +--- |
| 14 | + |
| 15 | +# Beautiful UI |
| 16 | + |
| 17 | +Beautiful UI is the practice of building interfaces that are meaningful, accessible, and structurally correct. Every element should carry semantic weight — describing what content _is_, not just how it _looks_. Every layout should respond to the user's device. Every form should be fast to complete and forgiving of mistakes. Beautiful UI fills the gap between "it looks right" and "it _is_ right." |
| 18 | + |
| 19 | +## When to Use |
| 20 | + |
| 21 | +Use this skill when: |
| 22 | + |
| 23 | +- Building page layouts with `<header>`, `<main>`, `<aside>`, `<footer>` landmarks |
| 24 | +- Structuring content sections with `<article>`, `<section>`, `<nav>` |
| 25 | +- Choosing between `<div>` / `<span>` and a more meaningful element |
| 26 | +- Writing navigation menus, breadcrumbs, and pagination |
| 27 | +- Building forms with proper labels, fieldsets, validation timing, and error presentation |
| 28 | +- Creating data tables with `<thead>`, `<tbody>`, `<caption>`, and `<scope>` |
| 29 | +- Establishing heading hierarchy (`<h1>` through `<h6>`) |
| 30 | +- Using interactive elements like `<details>`, `<dialog>`, `<menu>` |
| 31 | +- Embedding media with `<figure>`, `<figcaption>`, `<picture>`, `<video>` |
| 32 | +- Adding ARIA roles, live regions, skip links, or focus management |
| 33 | +- Making keyboard navigation work for tabs, menus, and custom widgets |
| 34 | +- Respecting `prefers-reduced-motion` and color contrast requirements |
| 35 | +- Building responsive layouts with Tailwind breakpoints and container queries |
| 36 | +- Creating responsive navigation (hamburger menus, off-canvas sidebars) |
| 37 | +- Making tables responsive (scroll, card transformation, priority columns) |
| 38 | +- Establishing typographic hierarchy with size, weight, and color |
| 39 | +- Using `tabular-nums` for data alignment, `text-balance` for headings |
| 40 | +- Configuring font stacks, custom fonts, and the prose/typography plugin |
| 41 | +- Designing form layouts (single-column, multi-column for related fields) |
| 42 | +- Implementing "reward early, punish late" validation with Inertia.js |
| 43 | +- Choosing between radio buttons and select menus |
| 44 | +- Building destructive action confirmations (type-to-confirm) |
| 45 | + |
| 46 | +## Rules |
| 47 | + |
| 48 | +Read individual rule files for detailed explanations and code examples: |
| 49 | + |
| 50 | +- [rules/semantic-html.md](rules/semantic-html.md) - Element selection guide: when to use which HTML element and why |
| 51 | +- [rules/accessibility.md](rules/accessibility.md) - ARIA roles, live regions, skip links, focus management, keyboard navigation, screen reader announcements, contrast, and reduced motion |
| 52 | +- [rules/responsive-patterns.md](rules/responsive-patterns.md) - Mobile-first breakpoints, container queries, responsive grids, navigation, tables, forms, touch targets, and viewport units |
| 53 | +- [rules/typography.md](rules/typography.md) - Type scale, font stacks, line height, line length, letter spacing, font weight hierarchy, text color, prose styling, truncation, tabular numbers, and dark mode |
| 54 | +- [rules/form-ux.md](rules/form-ux.md) - Form layout, label placement, input sizing, validation timing, error presentation, submit buttons, optional fields, help text, and destructive action confirmation |
| 55 | +- [rules/spacing-over-dividers.md](rules/spacing-over-dividers.md) - Default to spacing over borders and dividers — fewer lines, more whitespace, cleaner interfaces |
0 commit comments