# Bauhaus (`bauhaus`)

> A one-page site for a children’s art and science studio in Chengdu: the three age classes are a circle, a square and a triangle, and colour follows shape. Each class is a block of its colour with a window of its shape, the timetable is a grid of blocks, and every button is ink.

This is a worked example: one concept, built for one fictional client. Study how its concept turned into decisions and borrow the craft. Do not ship its surface (palette, motifs, component looks) for a different client unless your own concept, drawn from that client's world, leads to the same place.

- Chinese name: 包豪斯几何. 成都一间儿童美术与科学课堂的单页：三个班就是圆、方、三角三块积木，颜色跟着形状走；课程是三块开了形状窗口的色块，课表排成一格格积木，按钮一律用墨色。
- Category: Bold. Tags: Playful, Precise, Geometric, Colorful, Family, Sans-serif, Grid, Micro-interactions.
- Live page: [English](/en/sites/bauhaus/full/) · [Chinese](/sites/bauhaus/full/) · [viewer with desktop and mobile views](/en/sites/bauhaus/)
- Built with Astro, React, TypeScript and Tailwind CSS 4, plus React Bits, Motion Primitives, Motion.

## Where the concept came from

From the studio's own teaching kit: a box of wooden blocks painted by Kandinsky's 1923 questionnaire, 4 cm grid paper and a compass. The three age classes are named after the three shapes, so the three blocks on the first screen are the classes, and the class blocks are the faces of a shape sorter, each photo seen through the hole of its own shape.

## When it fits

Good for:
- Kids' art, science, coding or block-building schools that group children by age: the shapes become the classes, so parents find their child's class and fee at a glance.
- Family programmes at science centres and children's museums: playful, yet sessions, prices and rules stay clear.
- Open days and workshops at design schools and architecture studios, where geometric composition is already the language.

Avoid when:
- Luxury hotels and premium goods: the primaries are too loud and read as children’s products.
- Healthcare, finance and other services that need to feel calm and restrained.
- Homestays and restaurants that sell on photos and atmosphere: the colour blocks and composition compete with the pictures.

Industry fit (1-5): Education 5, Creative brand 4, Attraction 3, Tour guide 2, Hotel & homestay 2, Artisan 2, Restaurant 2, Export factory 1, Farm produce 1.

## Adapting it to another client

Keep:
- One colour rule you can state instead of ad-hoc accents: shape decides colour, the primaries go only on blocks, colour fields and shape windows, and buttons are ink.
- Practical facts drawn into the composition: classes are blocks with their fee on the colour field, the timetable is a grid of blocks, seats left are a row of small shapes.
- One hands-on signature that explains nothing in words: on a phone you tap a block and then the grid, and the picked block waits on the grid as a dashed outline; left alone, it is a finished picture.
- Square corners, flat colour and no shadows; section headings are short nouns, set big.

Change:
- Red, yellow, blue and the three shapes are this kids' studio's language; for another client, find the shapes and colours in its own tools, materials or drawings.
- Swap the block composer for assembly in the client's trade: putting together a set menu, an itinerary or a parts kit.
- Lowercase English headings, navigation and buttons follow Bauhaus print; drop it for clients who need to sound formal.

## Essentials

- **Color.** Near-black #1d1c1a on off-white paper #f3eee4. Colour follows shape: circles ultramarine #1f4c9c, squares vermilion #c8311f, triangles chrome #f2b51d. The primaries appear only on blocks, the three class fields and the map marks, never on buttons or as text. Buttons are ink with paper lettering and secondary buttons a 1.5px ink outline; on the ink safety section and footer they flip to paper with ink lettering. Text on the fields is paper on blue and red (4.6:1 on red) and ink on yellow.
- **Type.** Latin display in League Spartan 800, −0.035em tracking, 0.92 line height, all lowercase; text in Jost 400 at 17px with 1.55 line height. Chinese in Noto Sans SC: the name 三块积木 at 900 on the first screen, 80px on phones and 144px on desktop, over a 700 line with the category and city; section headings are nouns (教具, 课程, 课表, 安全与师资, 体验课, 常见问题) at 900 and 40–80px; body 16px with 1.85 line height and 0.02em tracking. Prices and times in League Spartan 700 tabular figures, with numbers and units kept on one line.
- **Layout.** A 4-column grid on phones and 12 on desktop, 8px base, square corners everywhere, no shadows and no rounded cards. On the first screen the three blocks and the name stand on one ground line across the page; on phones the blocks sit on the line and the name, three short sentences of facts and the booking button sit below it. Sections open with a big noun heading, with no numbers or small labels, and are set apart by space and ground. The classes are three colour blocks: bands on phones with the window left and the name and fee right, three upright blocks on desktop stepping up by age. The safety section is on ink, with the classroom photo bleeding off the left edge. The phone bar holds two actions, booking a trial and calling.
- **Imagery.** The studio's own teaching materials and its empty classroom: soft overcast north light, shot from above or at eye level on off-white paper, with only red, yellow and blue wood, pale wood and black in frame. Photos are seen through circle, square and triangle windows: the class photos through windows cut in fields of their own colour, sized to cut out about the same area; the block set through a large circle with a compass-drawn hairline beside it. The classroom photo is uncut and bleeds off the page. Teachers are drawn as figures made of blocks instead of portraits.
- **Motion.** Only the blocks bounce: a placed block scales 0.3 → 1.16/0.84 → 1 over 620ms, and drops and turns overshoot with cubic-bezier(0.34, 1.56, 0.64, 1) over 500ms. Everything else uses cubic-bezier(0.32, 0.72, 0, 1): the hero construction lines draw in 900ms, segment thumbs slide, FAQ triangles turn 90°. With reduced motion everything is static and complete.

## Common mistakes

- Spreading the primaries everywhere, or making the buttons red: bind colour to shape, make buttons ink, and keep red, yellow and blue on the blocks and colour fields.
- Adding hard shadows and thick outlines, or drawing Mondrian's black grid of coloured boxes: that is neo-brutalism and De Stijl. Bauhaus is flat colour, square corners and fine rules, with circles, squares and triangles standing as forms.
- A composer that narrates itself: hints like “tap a shape, then the grid” are the page talking about itself. Tap to pick and tap to place, hold to drag, let vertical swipes scroll, and show the picked block as a dashed outline on the grid.
- Slogan headings: “a circle, a square, a triangle.” reads as AI-written. Lead with the name and category, and title the sections with nouns.
- Headings in a non-geometric face or in capitals: use Futura-like League Spartan and Jost, in lowercase.

## Design tokens

| Token | Value | Role |
| --- | --- | --- |
| `--color-paper` | `#f3eee4` | Paper ground; text and buttons on the ink grounds |
| `--color-ink` | `#1d1c1a` | Text, rules, buttons and the inverted ground |
| `--color-pencil` | `#5d5850` | Secondary text |
| `--color-vermilion` | `#c8311f` | Squares, rectangles and the squares class field |
| `--color-chrome` | `#f2b51d` | Triangles and the triangles class field |
| `--color-ultramarine` | `#1f4c9c` | Circles and the circles class field |
| `--color-rule` | `rgb(29 28 26 / 0.16)` | Supporting |

Semantic colors with shadcn/ui names, ready for `globals.css`:

```css
:root {
  --background: #f3eee4;
  --foreground: #1d1c1a;
  --primary: #1d1c1a;
  --primary-foreground: #f3eee4;
  --muted-foreground: #5d5850;
  --border: rgb(29 28 26 / 0.16);
}
```

Fonts. The stacks use Fontsource family names; with Google Fonts or `next/font`, drop the " Variable" suffix. Each npm package holds the CSS and its unicode-range sliced font files. The jsDelivr links are for prototypes only: Google Fonts is blocked in mainland China and jsDelivr is unreliable there, so a production site for mainland visitors bundles the packages, or copies each CSS file with its `files/` folder to its own server or object storage and links that. A Chinese family costs about 100 KB of render-blocking CSS per weight (31 KB gzipped, about 100 slices); browsers then download only the slices for the characters on the page, so link only the weights you use.

- `--font-display`: "League Spartan Variable", "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", sans-serif
- `--font-sans`: "Jost Variable", "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", sans-serif
- League Spartan Variable: `npm install @fontsource-variable/league-spartan`, then `import '@fontsource-variable/league-spartan/wght.css'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/league-spartan@5.3.0/wght.css">`
- Jost Variable: `npm install @fontsource-variable/jost`, then `import '@fontsource-variable/jost/wght.css'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jost@5.3.0/wght.css">`
- Noto Sans SC Variable: `npm install @fontsource-variable/noto-sans-sc`, then `import '@fontsource-variable/noto-sans-sc/wght.css'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/noto-sans-sc@5.3.1/wght.css">`

Easing:

- `--ease-precise`: `cubic-bezier(0.32, 0.72, 0, 1)`
- `--ease-snap`: `cubic-bezier(0.34, 1.56, 0.64, 1)`

All tokens: [tokens.css](/styles/bauhaus/tokens.css) · [tokens.json](/styles/bauhaus/tokens.json)

## Page structure

Screenshots are 1440 × 900 (desktop) and 390 × 844 (mobile) viewports, on the Chinese page unless marked English. Sections taller than the screen, such as pinned scroll chapters, are captured part-way through.

1. **Header** (`:is(body, main) > header`): [components/Header.astro](/sources/bauhaus/components/Header.astro.txt). Visible in the Hero screenshots
2. **Hero** (`#top`): [components/Hero.astro](/sources/bauhaus/components/Hero.astro.txt). Screenshots: [desktop](/shots/bauhaus/top-desktop.jpg) · [mobile](/shots/bauhaus/top-mobile.jpg) · [desktop, English](/shots/bauhaus/top-desktop-en.jpg) · [mobile, English](/shots/bauhaus/top-mobile-en.jpg)
3. **Play** (`#play`): [components/Play.astro](/sources/bauhaus/components/Play.astro.txt). Screenshots: [desktop](/shots/bauhaus/play-desktop.jpg) · [mobile](/shots/bauhaus/play-mobile.jpg) · [desktop, English](/shots/bauhaus/play-desktop-en.jpg) · [mobile, English](/shots/bauhaus/play-mobile-en.jpg)
4. **Classes** (`#classes`): [components/Classes.astro](/sources/bauhaus/components/Classes.astro.txt). Screenshots: [desktop](/shots/bauhaus/classes-desktop.jpg) · [mobile](/shots/bauhaus/classes-mobile.jpg) · [desktop, English](/shots/bauhaus/classes-desktop-en.jpg) · [mobile, English](/shots/bauhaus/classes-mobile-en.jpg)
5. **Timetable** (`#timetable`): [components/Timetable.astro](/sources/bauhaus/components/Timetable.astro.txt). Screenshots: [desktop](/shots/bauhaus/timetable-desktop.jpg) · [mobile](/shots/bauhaus/timetable-mobile.jpg) · [desktop, English](/shots/bauhaus/timetable-desktop-en.jpg) · [mobile, English](/shots/bauhaus/timetable-mobile-en.jpg)
6. **Rules** (`#rules`): [components/Rules.astro](/sources/bauhaus/components/Rules.astro.txt). Screenshots: [desktop](/shots/bauhaus/rules-desktop.jpg) · [mobile](/shots/bauhaus/rules-mobile.jpg) · [desktop, English](/shots/bauhaus/rules-desktop-en.jpg) · [mobile, English](/shots/bauhaus/rules-mobile-en.jpg)
7. **Book** (`#book`): [components/Book.astro](/sources/bauhaus/components/Book.astro.txt). Screenshots: [desktop](/shots/bauhaus/book-desktop.jpg) · [mobile](/shots/bauhaus/book-mobile.jpg) · [desktop, English](/shots/bauhaus/book-desktop-en.jpg) · [mobile, English](/shots/bauhaus/book-mobile-en.jpg)
8. **Faq** (`#faq`): [components/Faq.astro](/sources/bauhaus/components/Faq.astro.txt). Screenshots: [desktop](/shots/bauhaus/faq-desktop.jpg) · [mobile](/shots/bauhaus/faq-mobile.jpg) · [desktop, English](/shots/bauhaus/faq-desktop-en.jpg) · [mobile, English](/shots/bauhaus/faq-mobile-en.jpg)
9. **Footer** (`:is(body, main) > footer`): [components/Footer.astro](/sources/bauhaus/components/Footer.astro.txt). Screenshots: [desktop](/shots/bauhaus/footer-desktop.jpg) · [mobile](/shots/bauhaus/footer-mobile.jpg) · [desktop, English](/shots/bauhaus/footer-desktop-en.jpg) · [mobile, English](/shots/bauhaus/footer-mobile-en.jpg)
10. **BookBar** (`#bookbar`): [components/BookBar.astro](/sources/bauhaus/components/BookBar.astro.txt). Visible in the Footer screenshots

## Key components

### BlockComposer

The signature: an 8×8 sheet of grid paper and a tray of 11 blocks, with no instructions on screen. With a mouse, drag blocks in to snap, click to turn, drag off to remove; on touch, tap a block and it waits in a free spot on the grid as a dashed outline, tap the grid to place it, press and hold to drag, and vertical swipes still scroll. Blocks squash and bounce as they land; at rest a finished cat sits there, with a bird and a robot one tap away.

- Source: [components/BlockComposer.tsx](/sources/bauhaus/components/BlockComposer.tsx.txt)
- Also needs: [shapes.ts](/sources/bauhaus/shapes.ts.txt)
- Appears in: Play (`play`)

### Class blocks

The first-screen poster: a circle rolls against a square with a triangle on top, and each block is a class with its ages and class size; tap one to jump to it. Compass arcs, a radius and an angle mark are drawn in hairlines, and the name stands on the same ground line.

- Source: [components/Hero.astro](/sources/bauhaus/components/Hero.astro.txt)
- Appears in: Hero (`top`)

### Colour fields with shape windows

Each class is a field of its colour with a window of its shape for the photo: a circle in blue, a square in red, a triangle in yellow, with the name, ages and fee on the field and the description and class size below. Bands on phones; on desktop three upright blocks stepping up by age.

- Source: [components/Classes.astro](/sources/bauhaus/components/Classes.astro.txt)
- Appears in: Classes (`classes`)

### Block timetable

The week as a grid with one class block per session, and seats left shown as a row of small shapes. On phones only the shape and seats remain, because the shape names the class; each winter-camp week is five red squares, one per day.

- Source: [components/Timetable.astro](/sources/bauhaus/components/Timetable.astro.txt)
- Also needs: [studio.ts](/sources/bauhaus/studio.ts.txt)
- Appears in: Timetable (`timetable`)

### BookingForm

Trial booking: RubberSegment picks the age group and day, its ink thumb sliding and squashing into place; the matching session, seats and fee (rolled by SlidingNumber) update, and the form composes a message to copy into WeChat, or you call to book.

- Source: [components/BookingForm.tsx](/sources/bauhaus/components/BookingForm.tsx.txt) (React Bits)
- Also needs: [studio.ts](/sources/bauhaus/studio.ts.txt)
- Built on React Bits `RubberSegment` ([components/ui/RubberSegment.tsx](/sources/bauhaus/components/ui/RubberSegment.tsx.txt), restyled): `npx shadcn@latest add https://reactbits.dev/r/RubberSegment-TS-TW.json`
- Built on Motion Primitives `sliding-number` ([components/ui/sliding-number.tsx](/sources/bauhaus/components/ui/sliding-number.tsx.txt), restyled): `npx shadcn@latest add https://motion-primitives.com/c/sliding-number.json`
- Appears in: Book (`book`)

### Shape decides colour

The .is-circle, .is-square and .is-triangle classes and their fill counterparts bind colour to shape; .btn is an ink rectangle and .btn-light its paper version for the ink grounds, with no arrows. Hover effects sit inside (hover: hover).

- Source: [styles.css](/sources/bauhaus/styles.css.txt)

## Dependencies

`npm install motion react-use-measure`

## Source files

Read only what you need:

- [Site.astro](/sources/bauhaus/Site.astro.txt): the whole page, with fonts, sections and scripts
- [styles.css](/sources/bauhaus/styles.css.txt): tokens and component classes
- [i18n.ts](/sources/bauhaus/i18n.ts.txt): all copy, in Chinese and English
- [meta.ts](/sources/bauhaus/meta.ts.txt): this guide as data
- [components/Header.astro](/sources/bauhaus/components/Header.astro.txt): section
- [components/Hero.astro](/sources/bauhaus/components/Hero.astro.txt): section
- [components/Play.astro](/sources/bauhaus/components/Play.astro.txt): section
- [components/Classes.astro](/sources/bauhaus/components/Classes.astro.txt): section
- [components/Timetable.astro](/sources/bauhaus/components/Timetable.astro.txt): section
- [components/Rules.astro](/sources/bauhaus/components/Rules.astro.txt): section
- [components/Book.astro](/sources/bauhaus/components/Book.astro.txt): section
- [components/Faq.astro](/sources/bauhaus/components/Faq.astro.txt): section
- [components/Footer.astro](/sources/bauhaus/components/Footer.astro.txt): section
- [components/BookBar.astro](/sources/bauhaus/components/BookBar.astro.txt): section
- [components/BlockComposer.tsx](/sources/bauhaus/components/BlockComposer.tsx.txt)
- [components/BookingForm.tsx](/sources/bauhaus/components/BookingForm.tsx.txt)
- [components/Mark.astro](/sources/bauhaus/components/Mark.astro.txt)
- [components/Portrait.astro](/sources/bauhaus/components/Portrait.astro.txt)
- [shapes.ts](/sources/bauhaus/shapes.ts.txt)
- [studio.ts](/sources/bauhaus/studio.ts.txt)
- [type.ts](/sources/bauhaus/type.ts.txt)
- [components/ui/RubberSegment.tsx](/sources/bauhaus/components/ui/RubberSegment.tsx.txt): React Bits `RubberSegment`, restyled
- [components/ui/sliding-number.tsx](/sources/bauhaus/components/ui/sliding-number.tsx.txt): Motion Primitives `sliding-number`, restyled

Everything in one file: [/sources/bauhaus.txt](/sources/bauhaus.txt) (about 34K tokens).

Before building, read the [design guide](/guide.md): the process and rules that apply to every site.
