Quarterly town hall
An internal announcement for a company town hall: what will be covered, who is speaking, and a button to save a seat in the hall. It is built with Nocturne, Mica’s editorial pack, to show a different visual language on the same document model.
Try this
Section titled “Try this”- Press Save my seat; the button gives way to a confirmation line.
- Press Meet the speakers to switch to the second page, and Back to the programme to return.
How it works
Section titled “How it works”The Nocturne vocabulary
Section titled “The Nocturne vocabulary”Nocturne shares the structural components with Signal but brings its own
content components — a display Heading whose accent is none, last or
underline, Quote, Divider, and a Button with a text variant. It has no
Section, Input, Avatar or DropdownMenu; framed blocks are Stacks with a
surface:
{ "hero": { "type": "Stack", "props": { "direction": "vertical", "gap": "lg", "align": "stretch", "justify": "start", "wrap": false, "padding": "xl", "surface": "ink" }, "children": [ "hero-heading", "hero-copy", "hero-quote" ] }, "hero-quote": { "type": "Quote", "props": { "content": "Bring the hard questions. That is what the hour is for.", "attribution": "Dana Whitfield", "role": "Chief executive" }, "children": [] }, "agenda-rule": { "type": "Divider", "props": { "label": "PROGRAMME", "weight": "bold" }, "children": [] }}The document is bound to the pack in its meta, and import would refuse any
Signal-only component in it:
{ "meta": { "pack": { "id": "mica.nocturne", "version": "1.0.0" } }}A stateful call to action
Section titled “A stateful call to action”{ "seat-button": { "type": "Button", "props": { "label": "Save my seat", "variant": "solid", "size": "md", "disabled": false, "fullWidth": false }, "children": [], "on": { "press": { "action": "setState", "params": { "statePath": "/seatSaved", "value": true } } }, "visible": { "$state": "/seatSaved", "eq": false } }, "seat-saved": { "type": "Text", "props": { "content": "Your seat is saved. See you Thursday.", "size": "md", "tone": "accent", "align": "left", "italic": false }, "children": [], "visible": { "$state": "/seatSaved", "eq": true } }}Saving a seat only changes session state here. To record it somewhere, a host
would declare a business object — for example an events.registration with a
create capability — and the button would dispatch create, as in the
support ticket example.
Complete document — examples/documents/town-hall.json
{ "envelopeVersion": 1, "ui": { "root": "app", "elements": { "app": { "type": "PageStack", "props": { "name": "Quarterly town hall" }, "children": [ "page-programme", "page-speakers" ] }, "page-programme": { "type": "Page", "props": { "title": "Programme", "background": "ink" }, "children": [ "masthead", "hero", "agenda-rule", "agenda", "seat" ] }, "masthead": { "type": "Stack", "props": { "direction": "horizontal", "gap": "md", "align": "center", "justify": "between", "wrap": true, "padding": "none", "surface": null }, "children": [ "masthead-mark", "masthead-date" ] }, "masthead-mark": { "type": "Heading", "props": { "content": "Town hall", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "masthead-date": { "type": "Text", "props": { "content": "Thursday · 10:00 · Main hall and online", "size": "sm", "tone": "muted", "align": "right", "italic": false }, "children": [] }, "hero": { "type": "Stack", "props": { "direction": "vertical", "gap": "lg", "align": "stretch", "justify": "start", "wrap": false, "padding": "xl", "surface": "ink" }, "children": [ "hero-heading", "hero-copy", "hero-quote" ] }, "hero-heading": { "type": "Heading", "props": { "content": "One hour, the whole company", "level": "1", "align": "left", "accent": "underline" }, "children": [] }, "hero-copy": { "type": "Text", "props": { "content": "The quarter in review, the plan for the next one, and an open floor at the end.", "size": "lg", "tone": "inverse", "align": "left", "italic": false }, "children": [] }, "hero-quote": { "type": "Quote", "props": { "content": "Bring the hard questions. That is what the hour is for.", "attribution": "Dana Whitfield", "role": "Chief executive" }, "children": [] }, "agenda-rule": { "type": "Divider", "props": { "label": "PROGRAMME", "weight": "bold" }, "children": [] }, "agenda": { "type": "Grid", "props": { "columns": 2, "gap": "lg", "padding": "none", "minCellWidth": 240 }, "children": [ "slot-open", "slot-product", "slot-people", "slot-qa" ] }, "seat": { "type": "Stack", "props": { "direction": "vertical", "gap": "md", "align": "start", "justify": "start", "wrap": false, "padding": "xl", "surface": "paper" }, "children": [ "seat-heading", "seat-copy", "seat-button", "seat-saved", "seat-speakers" ] }, "seat-heading": { "type": "Heading", "props": { "content": "Save a seat in the hall", "level": "2", "align": "left", "accent": "last" }, "children": [] }, "seat-copy": { "type": "Text", "props": { "content": "Seats are limited; the stream is not.", "size": "md", "tone": "muted", "align": "left", "italic": false }, "children": [] }, "seat-button": { "type": "Button", "props": { "label": "Save my seat", "variant": "solid", "size": "md", "disabled": false, "fullWidth": false }, "children": [], "on": { "press": { "action": "setState", "params": { "statePath": "/seatSaved", "value": true } } }, "visible": { "$state": "/seatSaved", "eq": false } }, "seat-saved": { "type": "Text", "props": { "content": "Your seat is saved. See you Thursday.", "size": "md", "tone": "accent", "align": "left", "italic": false }, "children": [], "visible": { "$state": "/seatSaved", "eq": true } }, "seat-speakers": { "type": "Button", "props": { "label": "Meet the speakers", "variant": "text", "size": "md", "disabled": false, "fullWidth": false }, "children": [], "on": { "press": { "action": "goToPage", "params": { "page": "page-speakers" } } } }, "page-speakers": { "type": "Page", "props": { "title": "Speakers", "background": "paper" }, "children": [ "speakers-heading", "speakers-rule", "speakers", "speakers-back" ] }, "speakers-heading": { "type": "Heading", "props": { "content": "On stage this quarter", "level": "1", "align": "left", "accent": "last" }, "children": [] }, "speakers-rule": { "type": "Divider", "props": { "label": null, "weight": "hairline" }, "children": [] }, "speakers": { "type": "Grid", "props": { "columns": 3, "gap": "lg", "padding": "none", "minCellWidth": 200 }, "children": [ "speaker-a", "speaker-b", "speaker-c" ] }, "speakers-back": { "type": "Button", "props": { "label": "Back to the programme", "variant": "outline", "size": "md", "disabled": false, "fullWidth": false }, "children": [], "on": { "press": { "action": "goToPage", "params": { "page": "page-programme" } } } }, "slot-open": { "type": "Stack", "props": { "direction": "vertical", "gap": "sm", "align": "stretch", "justify": "start", "wrap": false, "padding": "none", "surface": null }, "children": [ "slot-open-rule", "slot-open-title", "slot-open-copy" ] }, "slot-open-rule": { "type": "Divider", "props": { "label": "10:00", "weight": "hairline" }, "children": [] }, "slot-open-title": { "type": "Heading", "props": { "content": "Opening", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "slot-open-copy": { "type": "Text", "props": { "content": "Where the quarter landed, in ten minutes.", "size": "sm", "tone": "muted", "align": "left", "italic": false }, "children": [] }, "slot-product": { "type": "Stack", "props": { "direction": "vertical", "gap": "sm", "align": "stretch", "justify": "start", "wrap": false, "padding": "none", "surface": null }, "children": [ "slot-product-rule", "slot-product-title", "slot-product-copy" ] }, "slot-product-rule": { "type": "Divider", "props": { "label": "10:10", "weight": "hairline" }, "children": [] }, "slot-product-title": { "type": "Heading", "props": { "content": "Product", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "slot-product-copy": { "type": "Text", "props": { "content": "Two launches, one retirement, and what customers said.", "size": "sm", "tone": "muted", "align": "left", "italic": false }, "children": [] }, "slot-people": { "type": "Stack", "props": { "direction": "vertical", "gap": "sm", "align": "stretch", "justify": "start", "wrap": false, "padding": "none", "surface": null }, "children": [ "slot-people-rule", "slot-people-title", "slot-people-copy" ] }, "slot-people-rule": { "type": "Divider", "props": { "label": "10:35", "weight": "hairline" }, "children": [] }, "slot-people-title": { "type": "Heading", "props": { "content": "People", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "slot-people-copy": { "type": "Text", "props": { "content": "New teams, open roles and the office move.", "size": "sm", "tone": "muted", "align": "left", "italic": false }, "children": [] }, "slot-qa": { "type": "Stack", "props": { "direction": "vertical", "gap": "sm", "align": "stretch", "justify": "start", "wrap": false, "padding": "none", "surface": null }, "children": [ "slot-qa-rule", "slot-qa-title", "slot-qa-copy" ] }, "slot-qa-rule": { "type": "Divider", "props": { "label": "10:50", "weight": "hairline" }, "children": [] }, "slot-qa-title": { "type": "Heading", "props": { "content": "Open questions", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "slot-qa-copy": { "type": "Text", "props": { "content": "Anything goes. Submit ahead or ask live.", "size": "sm", "tone": "muted", "align": "left", "italic": false }, "children": [] }, "speaker-a": { "type": "Stack", "props": { "direction": "vertical", "gap": "sm", "align": "stretch", "justify": "start", "wrap": false, "padding": "none", "surface": null }, "children": [ "speaker-a-rule", "speaker-a-name", "speaker-a-topic" ] }, "speaker-a-rule": { "type": "Divider", "props": { "label": "CHIEF EXECUTIVE", "weight": "bold" }, "children": [] }, "speaker-a-name": { "type": "Heading", "props": { "content": "Dana Whitfield", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "speaker-a-topic": { "type": "Text", "props": { "content": "The year so far", "size": "md", "tone": "muted", "align": "left", "italic": true }, "children": [] }, "speaker-b": { "type": "Stack", "props": { "direction": "vertical", "gap": "sm", "align": "stretch", "justify": "start", "wrap": false, "padding": "none", "surface": null }, "children": [ "speaker-b-rule", "speaker-b-name", "speaker-b-topic" ] }, "speaker-b-rule": { "type": "Divider", "props": { "label": "HEAD OF PRODUCT", "weight": "bold" }, "children": [] }, "speaker-b-name": { "type": "Heading", "props": { "content": "Marcus Lee", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "speaker-b-topic": { "type": "Text", "props": { "content": "What shipped and why", "size": "md", "tone": "muted", "align": "left", "italic": true }, "children": [] }, "speaker-c": { "type": "Stack", "props": { "direction": "vertical", "gap": "sm", "align": "stretch", "justify": "start", "wrap": false, "padding": "none", "surface": null }, "children": [ "speaker-c-rule", "speaker-c-name", "speaker-c-topic" ] }, "speaker-c-rule": { "type": "Divider", "props": { "label": "PEOPLE LEAD", "weight": "bold" }, "children": [] }, "speaker-c-name": { "type": "Heading", "props": { "content": "Ana Sousa", "level": "3", "align": "left", "accent": "none" }, "children": [] }, "speaker-c-topic": { "type": "Text", "props": { "content": "Teams and the move", "size": "md", "tone": "muted", "align": "left", "italic": true }, "children": [] } }, "state": { "seatSaved": false } }, "meta": { "pack": { "id": "mica.nocturne", "version": "1.0.0" } }}