diff --git a/README.md b/README.md index 1632783..c1c19ad 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ why anything looks the way it does, and export the result. ### Components & labs - A full component library (buttons, inputs, selection, navigation, feedback, - overlays, data display, tables, notifications) and SVG charts (line, area, + overlays, data display, tables, notifications, content and marketing blocks, + mobile patterns) and SVG charts (line, area, bar, donut, radial, sparkline, scatter, waveform) that all read the active style. - Components Lab with desktop / tablet / mobile / custom viewports, rulers, @@ -36,6 +37,19 @@ why anything looks the way it does, and export the result. - Labs for SVG backdrops, data visualisation, tables, notifications, motion, materials and icons. +### Templates + +- One fictional product, Orbit, in three templates built only from the + component library: a desktop landing site (7 pages), the same site on a + phone, and a mobile app (17 screens across onboarding, home, goals, wallet, + chat and account). Every style restyles all of them. +- Fully clickable with no backend: links, forms, dialogs, sheets, menus, + toasts, loading and empty states. +- Screen, Flow (every screen on one board) and A / B / C views, a live list of + the components on screen that outlines them in the frame, share links, a + full-screen preview, and an optional image of your own that stays in the + tab's memory. + ### Generation - Procedural engine 2.0: seed → personality → semantic recipe → compatibility @@ -72,6 +86,7 @@ why anything looks the way it does, and export the result. | ![Style detail](docs/public/screenshots/styles-detail.png) | ![Relationship map](docs/public/screenshots/styles-map.png) | | ![Generator](docs/public/screenshots/generator.png) | ![Components Lab](docs/public/screenshots/components-lab.png) | | ![Customizer](docs/public/screenshots/customizer.png) | ![Labs](docs/public/screenshots/labs.png) | +| ![Templates](docs/public/screenshots/templates.png) | ![Templates compared in three styles](docs/public/screenshots/templates-compare.png) | **Live:** · **Docs:** — both built from `main` by GitHub Actions. @@ -119,7 +134,8 @@ src/ styles/ 30 built-in style definitions, treatments, docs, community loader components/ ui primitives, charts, svg, layout, preview features/ anatomy, compare, diff, inspector, mixer, export, search, shortcuts - pages/ Welcome, Dashboard, Styles, Generator, Components Lab, Labs, Customizer + pages/ Welcome, Dashboard, Styles, Generator, Components Lab, Templates, Labs, Customizer + templates/ the Orbit landing site and mobile app, their content and the component catalogue styles/community/ community style packages + index.json schemas/ JSON schema for a style definition tools/style-engine/ Python engine + validator (see its README) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 77860a1..43b7b22 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -23,6 +23,7 @@ export default defineConfig({ items: [ { text: 'Styles', link: '/guide/styles' }, { text: 'Components', link: '/guide/components' }, + { text: 'Templates', link: '/guide/templates' }, { text: 'Style Anatomy', link: '/guide/style-anatomy' }, { text: 'Customizer', link: '/guide/customizer' }, { text: 'Style Mixer', link: '/guide/style-mixer' }, diff --git a/docs/architecture.md b/docs/architecture.md index 920646f..9ecc69d 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -22,7 +22,7 @@ generation, validation and sharing all run in the browser, and state lives in ▼ component library + treatments.css (bespoke construction per family) │ - pages: Dashboard · Styles · Generator · Components Lab · Labs · Customizer + pages: Dashboard · Styles · Generator · Components Lab · Templates · Labs · Customizer ``` ## Layers @@ -38,6 +38,7 @@ generation, validation and sharing all run in the browser, and state lives in | Generator | `src/engine/generator/` | Seeded procedural engine (see [procedural-generation.md](procedural-generation.md)) | | Sharing | `src/engine/share.ts` | `?style=` / `?style=j.` links; generated styles carry seed + lineage | | Components | `src/components/ui`, `charts`, `svg`, `preview` | Everything reads tokens; nothing hard-codes a style | +| Templates | `src/templates/`, `src/pages/Templates/` | Product screens (landing site, mobile app) built from the components; see [Templates](guide/templates.md) | | Features | `src/features/*` | Anatomy, compare, diff, inspector, mixer, export, search, shortcuts | | Pages | `src/pages/*` | Routed views; tool pages are code-split | | Python engine | `tools/style-engine/` | Same algorithm for batch generation, CI validation and determinism tests | diff --git a/docs/guide/components.md b/docs/guide/components.md index d082f3c..be94218 100644 --- a/docs/guide/components.md +++ b/docs/guide/components.md @@ -19,8 +19,12 @@ focus behaviour. | Feedback | Alerts, toasts, progress bars and rings, skeletons, spinners, empty states | | Overlays | Modal, drawer, tooltip, popover, dropdown menu, context menu | | Data | Avatars, lists, timeline, activity feed, stats, tables, charts | +| Content & marketing | Accordion, chips and chip groups, carousel, rating, pricing card, testimonial | +| Mobile patterns | Status bar, app bar, bottom tab bar, chat bubble, code input, bottom sheet | -Use the search box in the left panel to jump to a component. +Use the search box in the left panel to jump to a component. To see the +components working together in real product screens, open +[Templates](/guide/templates). ## Interaction states diff --git a/docs/guide/templates.md b/docs/guide/templates.md new file mode 100644 index 0000000..0c73c9b --- /dev/null +++ b/docs/guide/templates.md @@ -0,0 +1,125 @@ +# Templates + +**Templates** shows what a style looks like on a real product. Orbit is a +fictional personal-money app with three templates: a desktop landing site, the +same site on a phone, and the mobile app. Every screen is built only from the +component library, so switching the style in the header restyles all of them. + +![Templates](/screenshots/templates.png) + +## The three templates + +| Template | Frame | Screens | +| --- | --- | --- | +| Desktop landing | 1440px browser | Home, Features, Pricing, About, Blog, Contact, Sign in | +| Mobile landing | 390px phone browser | The same seven pages, laid out for a phone | +| Mobile app | 390px phone | 17 screens in six flows (below) | + +The landing site is **one responsive site**. Its layout responds to the width +of the frame through CSS container queries, not to the browser window. The +phone version is therefore the real responsive behaviour: a menu button that +opens a side drawer, stacked sections, swipeable testimonials and a compact +product demo. + +The app screens are grouped into the flows a person walks through: + +| Flow | Screens | +| --- | --- | +| Onboarding | Splash, Welcome (carousel), Sign in, Verify (6-digit code), Permissions | +| Everyday | Home, Discover, Notifications | +| Goals | Goal, New goal (three steps), Goal created | +| Money | Wallet: cards, card designer, charts, transactions, statements | +| Social | Chats, Chat with a playable voice note | +| Account | Profile, Settings, App states (loading, empty, error, offline) | + +## Everything is clickable + +There is no backend, but everything responds the way the real product would: + +- Links and tabs move between screens. +- Forms validate. +- Dialogs, sheets, menus and popovers open and close. +- Toasts confirm actions. +- Loading and empty states appear when you filter. + +A few examples to try: + +- **Pricing:** switch to yearly or student pricing, then start a trial. +- **Sign in:** sign in with any password of six or more characters, then paste + any six digits as the code. +- **Blog:** filter or search until nothing matches. +- **Chat (app):** play the voice note, send a message, or right-click a + message for its menu. + +## Viewing modes + +The toolbar above the frame switches between three views: + +- **Screen:** one screen at its true size, zoomed to fit. Use **Fit** or a + fixed zoom (50%, 75%, 100%) and the arrows to step through the screens. +- **Flow:** every screen of the template on one board, grouped by flow. + Click a thumbnail to open it. +- **A / B / C:** the same screen in three styles side by side. Pick each style + above its frame. Links you follow apply to all three frames. + +![Comparing three styles](/screenshots/templates-compare.png) + +## Components on this screen + +The **Components** panel lists every library component rendered in the frame, +with a count for each. The list updates live as you interact, for example when +a dialog opens. + +- Hover a name to outline those components in the frame. +- Click a name to scroll to the first one. +- **Opens on interaction** lists components behind a button, such as a modal + or a sheet. + +In the Flow view the panel covers the whole template. Each template uses every +component in the library. The one exception is the desktop navigation bar, +which the app replaces with its tab bar. A test fails if a template stops +using a component. + +Press Ctrl+Shift+X to turn on the token +inspector, then click any element in a frame to see the tokens behind it. + +![The flow board](/screenshots/templates-flow.png) + +## Sharing and full screen + +- **Copy link** copies a URL that opens the same template, screen, view and + style. A custom or generated style travels inside the link, as everywhere + else in UI Explorer. +- **Full screen** opens `/preview/