Write
One way to write each thing: styles in style={{}}, space as gap.
For AI agents
Your agent writes the template, checks it with validate() and outline(), and renders an email, a page, a PDF or an image.
One way to write each thing: styles in style={{}}, space as gap.
validate() lists every problem with its code, its path and the fix.
outline() prints the laid-out template as text, to check without looking.
render(), renderPdf() or renderImage(). The same input gives the same output.
Give it the guide
GUIDE.md is written from the components' own definitions, so it matches the version you installed.
@node_modules/@hyper-elements/react/GUIDE.mdBefore writing a Hyper Elements template, read
node_modules/@hyper-elements/react/GUIDE.md.Email 600px: background #ece7df
Section 600px
Row 600px: 2 side by side
Column 292px
Text 292px "Tarn (https://tarn.example)"
Column 292px
Text 292px "Order TC-20418"
Column 600px: background #fffdf9
Column 504px
Text 504px "Shipped 5 November"
Heading h1 504px "Packed in straw, / and on its way."
Text 440px "Rowan wrapped your three pieces this morning. They’re with Parcelforce now, and…"
Row 504px: 4 side by side
Column 117px
Column 117px: background #3e6b61
Text 117px "Ordered/ 2 Nov"
Column 117px
Column 117px: background #3e6b61
Text 117px "Packed/ 5 Nov"
Column 117px
Column 117px: background #3e6b61
Text 117px "On its way/ 5 Nov"
Column 117px
Column 117px: background #e6dfd5
Text 117px "Delivered/ Mon 9 Nov"
Button: background #3e6b61 "Follow your parcel" → https://tarn.example/orders/TC-20418/track
Column 504px
Text 504px "In the box"
Row 504px: 3 side by side
Column 48px: background #b9d2c6
Column 348px
Text 348px "Tea bowls, celadon"
Text 348px "A pair, 9 cm across"
Column 68px
Text 68px "£64.00"
Row 504px: 3 side by side
Column 48px: background #efebe2
Column 348px
Text 348px "Serving bowl, ash white"
Text 348px "24 cm across"
Column 68px
Text 68px "£58.00"
Row 504px: 3 side by side
Column 48px: background #3b2a22
Column 348px
Text 348px "Pouring jug, tenmoku"
Text 348px "Holds 600 ml"
Column 68px
Text 68px "£46.00"
Column 504px
Row 504px: 2 side by side
Column 384px
Text 384px "Subtotal"
Column 120px
Text 120px "£168.00"
Row 504px: 2 side by side
Column 384px
Text 384px "Delivery, tracked"
Column 120px
Text 120px "£7.50"
Row 504px: 2 side by side
Column 384px
Text 384px "Paid"
Column 120px
Text 120px "£175.50"
Row 504px: 2 side by side, stacked on phones
Column 240px
Text 240px "Delivering to"
Text 240px "Ada Whitlock / 14 Rookery Lane, Didsbury / Manchester M20 6RG"
Column 240px
Text 240px "Paid with"
Text 240px "Visa ending 0417 / on 2 November 2026"
Text 504px "Every piece is stoneware, thrown by hand, so yours will differ a little from th…"
Text 600px "Tarn Ceramics, Unit 4, Mytholm Works, Hebden Bridge HX7 6DL. Questions about yo…"Page 1200px: background #fbf7f0
Section 1200px
Row 1104px: 2 side by side
Column 1088px
Text 1088px "Casa Albero (https://casaalbero.example)"
Row: 2 side by side
Row: 4 side by side, desktop only
Text "House (https://casaalbero.example/house)"
Text "Rooms (https://casaalbero.example/rooms)"
Text "Year (https://casaalbero.example/year)"
Text "Travel (https://casaalbero.example/travel)"
Button: background transparent "Book a stay" → https://casaalbero.example/book
Section 1200px
Row 1104px: 2 side by side, stacked on phones
Column 512px
Text 512px "A guesthouse in the hills above Lucca"
Heading h1 512px "Stay where the olives grow."
Text 470px "Six rooms in a stone farmhouse, a long table under the pergola, and forty hecta…"
Row 512px: 2 side by side
Button: background #a9472a "Book a stay" → https://casaalbero.example/book
Text 424px "See the rooms (https://casaalbero.example/rooms)"
Column 520px
Image 520px [Hills above Lucca at evening: a farmhouse with a tower, olive groves, a white road and cypresses, framed by an arched window.] data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%…
Section 1200px: background #f2eadd
Text 1104px "The house"
Row 1104px: 2 side by side, stacked on phones
Column 520px
Heading h2 520px "A farmhouse that has fed itself from its own hill since 1780."
Column 528px
Text 528px "The house was built by a family of olive pressers, and the old press is still i…"
Text 528px "Twelve years on, breakfast is our own bread, our neighbours’ eggs and figs from…"
Text 528px "Giulia and Tomás"
Section 1200px
Column 1104px
Text 1104px "The rooms"
Heading h2 1104px "Six rooms, no two alike"
Column 1104px
Row 1104px: 2 side by side
Row 988px: 2 side by side, stacked on phones
Column 372px
Text 340px "La Torre"
Column 612px
Text 612px "Up the tower’s own stair, with windows on all four sides."
Column 84px
Text 84px "€320"
Text 84px "sleeps 2"
Row 1104px: 2 side by side
Row 988px: 2 side by side, stacked on phones
Column 372px
Text 340px "Il Frantoio"
Column 612px
Text 612px "The old olive press room, vaulted, and cool all summer."
Column 84px
Text 84px "€260"
Text 84px "sleeps 2 or 3"
Row 1104px: 2 side by side
Row 988px: 2 side by side, stacked on phones
Column 372px
Text 340px "La Limonaia"
Column 612px
Text 612px "The lemon house, opening onto the garden and the pool."
Column 84px
Text 84px "€240"
Text 84px "sleeps 2"
Row 1104px: 2 side by side
Row 988px: 2 side by side, stacked on phones
Column 372px
Text 340px "Il Fienile"
Column 612px
Text 612px "The hayloft, under the beams, with a bath by the window."
Column 84px
Text 84px "€220"
Text 84px "sleeps 2"
Row 1104px: 2 side by side
Row 988px: 2 side by side, stacked on phones
Column 372px
Text 340px "La Loggia"
Column 612px
Text 612px "Off the loggia, looking west over the valley to the sea."
Column 84px
Text 84px "€200"
Text 84px "sleeps 2"
Row 1104px: 2 side by side
Row 988px: 2 side by side, stacked on phones
Column 372px
Text 340px "Le Stalle"
Column 612px
Text 612px "The old stables: two rooms, for a family."
Column 84px
Text 84px "€180"
Text 84px "sleeps 4"
Text 1104px "Prices are a night for the room, with breakfast. Supper at the long table is €4…"
Section 1200px
Text 1104px "The year at the house"
Row 1104px: 2 side by side, stacked on phones
Row 536px: 2 side by side, stacked on phones
Column 252px
Text 252px "Spring"
Text 252px "March to May"
Text 252px "Wild asparagus in the hedges, the first swims, and the hills green for a few we…"
Column 252px
Text 252px "Summer"
Text 252px "June to August"
Text 252px "Long days, the pool, and supper outside under the pergola until the swifts go t…"
Row 536px: 2 side by side, stacked on phones
Column 252px
Text 252px "Autumn"
Text 252px "September to November"
Text 252px "The harvest. Pick with us for a morning, and take home a litre of oil from your…"
Column 252px
Text 252px "Winter"
Text 252px "December to February"
Text 252px "We close in January and February: the house rests, and so do we."
Section 1200px: background #a9472a
Row 1104px: 2 side by side, stacked on phones
Column 816px
Heading h2 816px "The harvest weeks are filling up."
Text 560px "From €180 a night, with breakfast. Free to cancel until thirty days before you …"
Column 240px
Button 240px: background #fbf7f0 "Book a stay" → https://casaalbero.example/book
Section 1200px
Row 1104px: 2 side by side, stacked on phones
Column 1096px
Text 1096px "Casa Albero, Via di Vallebuia 14, 55100 Lucca, Italy"
Column
Text 1104px "stay@casaalbero.example (mailto:stay@casaalbero.example) · +39 0583 000 412"Document 666px: background #ffffff
Document.Page 666px
Row 666px: 2 side by side, stacked on phones
Column 321px
Text 321px "Pell & Ashby"
Text 321px "Architects"
Column 321px
Text 321px "14 Calvert Mews, London E2 7LL / +44 20 7946 0321 · studio@pellashby.example"
Row 666px: 2 side by side, stacked on phones
Column 322px
Heading h1 322px "Invoice"
Text 322px "Hawthorn Lane House, Stage 4 / 1 September to 31 October 2026"
Column 320px
Column 320px
Text 320px "Billed to"
Text 320px "Clara Wendt, Wendt Family Trust / 3 Hawthorn Lane, Saffron Walden CB11 4QE"
Column 666px
Row 666px: 4 side by side, stacked on phones
Column 149px
Column 149px
Text 149px "Invoice"
Text 149px "PA-0114"
Column 149px
Column 149px
Text 149px "Issued"
Text 149px "4 November 2026"
Column 148px
Column 148px
Text 148px "Due"
Text 148px "4 December 2026"
Column 148px
Column 148px
Text 148px "Amount due"
Text 148px "£17,731.20"
Table 666px
TableRow 666px
TableCell 394px "Work"
TableCell 64px "Hours"
TableCell 72px "Rate"
TableCell 136px "Amount"
TableRow 666px
TableCell 394px "Technical design drawings / Plans, sections and elevations at 1:50; key details…"
TableCell 64px "64"
TableCell 72px "£95"
TableCell 136px "6,080.00"
TableRow 666px
TableCell 394px "Specification and schedules / Doors, windows, finishes and ironmongery"
TableCell 64px "36"
TableCell 72px "£85"
TableCell 136px "3,060.00"
TableRow 666px
TableCell 394px "Structural coordination / With Hale Engineering: steel frame and foundations"
TableCell 64px "22"
TableCell 72px "£95"
TableCell 136px "2,090.00"
TableRow 666px
TableCell 394px "Planning conditions / Materials, landscaping and drainage: conditions 3, 5 and 9"
TableCell 64px "18"
TableCell 72px "£95"
TableCell 136px "1,710.00"
TableRow 666px
TableCell 394px "Site visits and minutes / Four visits, 2 September to 28 October"
TableCell 64px "16"
TableCell 72px "£95"
TableCell 136px "1,520.00"
TableRow 666px
TableCell 394px "Expenses, at cost / Printing and rail travel; receipts attached"
TableCell 64px "—"
TableCell 72px "—"
TableCell 136px "316.00"
TableRow 666px
TableCell 394px
TableCell 136px "Subtotal"
TableCell 136px "14,776.00"
TableRow 666px
TableCell 394px
TableCell 136px "VAT at 20%"
TableCell 136px "2,955.20"
TableRow 666px
TableCell 394px
TableCell 136px "Total due"
TableCell 136px "£17,731.20"
Column 666px
Row 666px: 4 side by side, stacked on phones
Column 149px
Column 149px
Text 149px "Pay by transfer"
Text 149px "Within 30 days, please"
Column 149px
Column 149px
Text 149px "Account name"
Text 149px "Pell & Ashby Ltd"
Column 148px
Column 148px
Text 148px "Sort code · Account"
Text 148px "20-45-77 · 63418820"
Column 148px
Column 148px
Text 148px "Reference"
Text 148px "PA-0114"
Document.Page 666px
Row 666px: 2 side by side, stacked on phones
Column 321px
Text 321px "Pell & Ashby"
Column 321px
Text 321px "Invoice PA-0114 · Time summary"
Column 666px
Heading h2 666px "Where the hours went"
Text 520px "Stage 4 took 156 hours between 1 September and 31 October. Here they are by pha…"
Column 666px
Text 666px "By phase"
Column 666px
Row 666px: 3 side by side, stacked on phones
Column 196px
Text 196px "Technical design drawings"
Svg 325px (1 shapes)
Column 96px
Text 96px "64 h · 41%"
Row 666px: 3 side by side, stacked on phones
Column 196px
Text 196px "Specification and schedules"
Svg 325px (1 shapes)
Column 96px
Text 96px "36 h · 23%"
Row 666px: 3 side by side, stacked on phones
Column 196px
Text 196px "Structural coordination"
Svg 325px (1 shapes)
Column 96px
Text 96px "22 h · 14%"
Row 666px: 3 side by side, stacked on phones
Column 196px
Text 196px "Planning conditions"
Svg 325px (1 shapes)
Column 96px
Text 96px "18 h · 12%"
Row 666px: 3 side by side, stacked on phones
Column 196px
Text 196px "Site visits and minutes"
Svg 325px (1 shapes)
Column 96px
Text 96px "16 h · 10%"
Column 666px
Text 666px "By week"
Column 666px
Svg 665px (10 shapes)
Column 666px
Row 666px: 9 side by side, stacked on phones
Column 74px
Text 74px "14 h / 31 Aug"
Column 74px
Text 74px "18 h / 7 Sep"
Column 74px
Text 74px "22 h / 14 Sep"
Column 74px
Text 74px "20 h / 21 Sep"
Column 74px
Text 74px "16 h / 28 Sep"
Column 74px
Text 74px "12 h / 5 Oct"
Column 74px
Text 74px "19 h / 12 Oct"
Column 74px
Text 74px "21 h / 19 Oct"
Column 74px
Text 74px "14 h / 26 Oct"
Column 666px
Text 666px "By person"
Table 666px
TableRow 666px
TableCell 345px "Ines Morrow"
TableCell 193px "Project architect"
TableCell 64px "74 h"
TableCell 64px "47%"
TableRow 666px
TableCell 345px "Sam Okafor"
TableCell 193px "Architectural assistant"
TableCell 64px "34 h"
TableCell 64px "22%"
TableRow 666px
TableCell 345px "Hannah Pell"
TableCell 193px "Director"
TableCell 64px "28 h"
TableCell 64px "18%"
TableRow 666px
TableCell 345px "Oliver Ashby"
TableCell 193px "Director"
TableCell 64px "20 h"
TableCell 64px "13%"
Text 480px "Hours are recorded to the quarter hour and rounded here, so the phases add up t…"
PageFooter 666px
Row 666px: 2 side by side, stacked on phones
Column 578px
Text 578px "Pell & Ashby Architects Ltd · Registered in England and Wales, 09412873 · VAT G…"
Column 64px
Text 64px "of"Canvas 1200px: background #3b1fa8
Layer 1200px
Svg 1200px (18 shapes)
Column 700px
Column 636px
Row 636px: 1 side by side, stacked on phones
Text: background #c6f36b "Live workshop"
Heading h1 636px "Design systems that don't break"
Text 560px "Forty-five minutes on tokens, variants and naming, with questions at the end."
Row 636px: 3 side by side, stacked on phones
Text "Thu 20 Nov"
Text "5pm GMT"
Text: background #ffffff "Free"
Row 636px: 2 side by side, stacked on phones
Row 280px: 2 side by side, stacked on phones
Column 60px: background #c6f36b
Row 60px: 1 side by side, stacked on phones
Text "AO"
Column 206px
Text 206px "Ama Owusu"
Text 206px "Design lead, Gridline"
Row 280px: 2 side by side, stacked on phones
Column 60px: background #ff8fcf
Row 60px: 1 side by side, stacked on phones
Text "JP"
Column 206px
Text 206px "Jonas Petrov"
Text 206px "Staff engineer"Layout as text
Every block, its width and its words, for any output. The agent checks the layout without reading HTML or opening a PDF.
Try it
Read https://hyperelements.dev/llms.txt. Then write a Hyper Elements template for [an email, a page, a PDF or an image]. Run validate() and fix every error, then show me outline().