# Tessera — full reference > Every page of https://fgjcarlos.github.io/tessera as plain text, for AI agents. The machine-readable widget catalog (node types, config keys, fields, layouts, templates) is at https://fgjcarlos.github.io/tessera/catalog.json, and a running dashboard serves the installed version at //catalog.json. --- # Machine dashboards for Node-RED Source: https://fgjcarlos.github.io/tessera/ Build an operator panel in Node-RED, try the live aquaculture demo, and install the example flow on your own runtime. ## Try the panel This fish-farm panel runs in your browser with simulated readings. Watch the water temperature trend, check the feed silo level, then try the **Main pump** switch. [Run the example flow in your own Node-RED instance →](/tessera/getting-started/#try-the-demo) ## Build a panel for your machine ### Lay it out with live data Drag a gauge onto the page, give it a unit, then apply the layout. A gauge node appears in the editor, ready for your sensor's output. [See the visual builder →](/tessera/builder/) ### Take it onto the plant floor Put the operator's panel in full-screen kiosk mode and adjust the layout for a maintenance tablet. Node-RED serves the dashboard on the local network. [Explore layouts →](/tessera/concepts/layout/) ### Connect a reading or a control Send a value in `msg.payload`. Change a label or colour with `msg.ui`. Wire a switch's output back to the flow to act on an operator's input. [Try a switch →](/tessera/components/switch/) ### Keep the operator view small The entry JavaScript and CSS have a 50 KiB gzip budget. Visible widget types load first, followed by other pages' types when the browser is idle. The builder loads when you edit. [Browse the widgets →](/tessera/components/stat/) --- # Visual builder Source: https://fgjcarlos.github.io/tessera/builder Build dashboards on the real page — add, arrange and configure widgets, then wire them in Node-RED. The builder opens your real dashboard, with live data, in edit mode. You add widgets from a palette, arrange and resize them on the page, set their properties, and organise pages and layouts. Everything you do comes back to the Node-RED editor as normal edits: pending until you **Deploy**, undoable with **Ctrl+Z** (redo with **Ctrl+Shift+Z** or **Ctrl+Y**). The Node-RED editor stays the source of truth. ![The builder: the Components palette on the left, the page being edited in the middle with a widget selected, its properties in the inspector on the right, the toolbar floating at the bottom](/tessera/img/builder-overview.jpg) ## Open it In the Node-RED editor, open the **Tessera** tab in the right sidebar (▦) and click **Edit layout** next to a page. The builder opens in a new window. ![The Tessera tab in the Node-RED editor sidebar: the dashboard with its pages, each with an Edit layout button, an open-dashboard button and a menu](/tessera/img/editor-sidebar.jpg) The builder starts from what the Node-RED editor has, including changes you haven't deployed yet. ## Add widgets The **Components** palette on the left (its **Widgets** tab; the other tabs are [Layers](#layers) and [Tags](#tags)) lists every widget with its default size, grouped by category (*Indicators*, *Charts*, *Data*, *Controls*, *Inputs*, *Media*, *Feedback*). Collapse the sections you don't use, or search: names, descriptions and tags all match (try *toggle*, *trend* or *setpoint*). **Drag** a widget onto the page — the main grid, a sidebar or a band — and drop it where you want it. It appears straight away with sample data, marked **NEW**. Drop it outside the page to cancel, or click **×** to discard it. **Feedback** widgets ([notifications](/tessera/components/notification/)) don't take a place on the grid: they show on every page. **Click** one in the palette to add it; the palette lists them under *Feedback on this dashboard*, with a button to preview each one. On *Apply* they go to a *Feedback* group in the *Tessera UI* flow. ### Page templates Templates build a whole page at once, with sample data so it looks right before you wire anything. ![The seven page templates in the palette, each with a thumbnail of its layout, a description, its widget count and a page button](/tessera/img/builder-templates.jpg) | Template | Layout | Widgets | |---|---|---| | **Monitoring** | Grid | 4 KPIs, a gauge and a trend chart | | **Control panel** | Sidebar right | process chart and KPIs; switches, setpoint sliders, Start/Stop in the sidebar | | **Trend** | Top band | 4 KPIs in the band, a large chart | | **Overview** | Band + sidebar | KPI band, gauge and chart, controls on the side | | **Alarms** | Top band | device states (running, stopped, fault) in the band, alarm count, last event and an alarm list to acknowledge | | **Shift report** | Top band | a period picker and two totals in the band, units per line (bar chart) and downtime by cause (pie chart) | | **Production** | Sidebar right | machine state, batch progress and three tank levels; recipe, batch size, operator and Start/Abort in the sidebar | - **Drag** a template onto the page to add its widgets. An empty page also takes the template's layout; otherwise the widgets go into the regions the page has. - **+ page** creates a new page from the template. ![A page created from the Control panel template: a chart and two KPIs in the main grid, switches, sliders and buttons in the sidebar, every widget marked NEW](/tessera/img/builder-template-page.jpg) ## Arrange - **Drag** a widget to any cell of the grid: it stays where you drop it, on any row, even with empty cells around. If it lands on other widgets, they're pushed down. You can also drag between regions (main grid, sidebar, band…); in sidebars, widgets just go one after another. - **Arrow keys** move the selected widget by one cell. The inspector shows its **Column** and **Row** too. - **Resize** it from the bottom-right corner; it snaps to the dashboard's grid (12 columns by default), and pushes down what it now covers. - **Align, distribute and match size**: with two or more widgets of the same grid region selected (Shift + click, or Ctrl + A), a bar appears above the toolbar. All in grid cells, each action one undo step (and redo): - **Align** the left, right, top or bottom edges, or the horizontal / vertical centers, to the selection's bounding box (a center that falls between two cells goes to the left / top one). - **Distribute** horizontally or vertically (3 or more widgets): the outermost widgets stay and the others get equal gaps, one cell apart at most when the space doesn't divide evenly. If the widgets are wider than the space between the outer ones, they sit side by side without gaps, as close as possible. - **Match width, height or both** to the **first selected** widget (the one you clicked first). A widget that no longer fits the grid is moved left, not cut. Widgets that end up overlapping are pushed down, as always. The bar isn't shown for sidebars and other stack regions, which have no cells. - Arrange on a window at least 768 px wide: narrower, the page shows the phone layout. To arrange the phone layout use the [Phone preview](#preview-on-tablet-and-phone) from any window size. - For finer steps, switch the dashboard to the **Fine** (24 × 44 px) or **Extra fine** (48 × 20 px) grid, or type any number of columns from 4 to 48 and a row height of 16–240 px, in **Dashboard settings** → *Layout* → *Grid*. Every widget is converted, so pages keep their look. The same section sets the columns of the Tablet and Phone previews. See [Grid size](/tessera/concepts/layout/#grid-size). - **Resize regions** from the handles on the dashed outlines: the bar between the grid and a sidebar sets its width, the handle on a region's bottom edge sets a minimum height. See [Layout](/tessera/concepts/layout/#resizing-regions). ### The toolbar The toolbar at the bottom groups its actions: the page and the panels (Pages, Dashboard settings, Version history) on the left, the preview controls, the selection actions, then Undo / Redo, the pending-changes summary and Apply / Apply & deploy on the right. When the window — or the two side panels — leave it too little room, it drops the least used actions first and keeps Undo, Redo, Apply & deploy and **More** at the narrowest width; everything it drops is in the **More** menu, under a heading of its group, with the same name and the same shortcut. **Revert unapplied changes** lives only in that menu (it is rare and irreversible). The toolbar is one Tab stop: **←** / **→** (and **Home** / **End**) walk its controls across both rows and **Enter** / **Space** runs one. The menu is a proper menu: **↑** / **↓** move, **→** opens a submenu, **←** leaves it, **Esc** or **Tab** closes it and puts the focus back on the button. Align-and-distribute actions need a selection and the Desktop preview; while the bar cannot show their row, the menu keeps them but dims them, exactly as the row does. ## Configure: the properties inspector The panel on the right edits whatever is selected, with a live preview on the page: - **One widget**: every property, grouped in *Content* (label, icon, unit…), *Appearance* (style, color, size, decimals, ranges, thresholds…) and *Behaviour* (payload, topic, tag, confirmation…), plus *Layout* (width, height, region). Icons have a searchable picker with all ~2,400 Lucide icons. - **Several widgets of the same type**: change them all at once; fields that differ show *Mixed*. - **Several types**: their layout (width, height, region). - **Nothing selected**: the **page** (title, icon, layout, fit to screen, full width) and a **Dashboard settings…** button for the **app** (grid, navigation, theme, accent, title, logos, custom CSS), which opens the [dashboard settings](#dashboard-settings) on the tab you used last. ## Select, duplicate, delete - **Click** a widget to select it, **Shift + click** to add or remove widgets, **Ctrl + A** for the whole page; **Esc** or a click on the background clears the selection. - **Ctrl + D** duplicates the selection right after the originals. In Node-RED the copy is a full copy of the node (payload, topic, thresholds…), placed next to the original, in the same group, without wires. - **Ctrl + C** copies the selection and **Ctrl + V** pastes it on the page you are on, this one or another: the widgets keep their relative positions, as a block, at the first free spot of the page (and region); if the dashboard's grid changed since the copy, they are converted. Pasted widgets are created without wires (a full copy of the node otherwise, in the target page's group) and become the selection. The copy lives in the builder only: reloading it forgets it. One undo step. - **Ctrl + Alt + C** copies the style of the (first) selected widget and **Ctrl + Alt + V** applies it to the whole selection. Style is the visual props each widget lists as `style` in the catalog (`catalog.json`): variant, color, size, full width and icons of a button, format, size, alignment and color of a text, decimals and thresholds of a stat, gauge or progress, orientation, the status style, the image fit, the template frame… never the label, data, payload, topic, page or position and size. Pasting onto another widget type applies only the keys that type has (a button's color on a text, nothing on a switch). Widgets from extension packages take part only if their catalog declares `style`. One undo step; the copied style lives in the builder only. - **Double-click** a widget's title, or press **Enter** on the selected widget, to **edit it in place** instead of going to the inspector: the title (`label`) of every widget with a header, the text of a **Text** (its `format`, the part you see; double-click the text itself) and the caption of a **Button**. **Enter** or a click elsewhere saves, **Esc** cancels and restores it; the text is plain (pasted text loses its formatting and line breaks). It goes through the same path as the inspector, so it is one undo step (and redo) and Apply & deploy writes it to the node. An empty title is allowed (the header disappears); a button keeps its caption when you empty it. Enter edits the first thing the widget lists (its title; for a Text, the text), and a double-click edits the one under the pointer. The list is `inline` per widget in `catalog.json`. - **Delete** removes the selection. If a node is wired to other nodes, the builder asks first; its wires are removed too. Undo in the Node-RED editor brings back the node and its wires. A [section](/tessera/components/section/) always asks, wired or not: **Delete section only** keeps the widgets it frames, **Delete section and N widgets** removes them too, **Cancel** (or Esc) does nothing. With other widgets selected too, the dialog says that those are deleted either way and warns when any node that goes is wired. The × on a section that is not applied yet asks as well. The dialog is keyboard operable (Tab, Enter, Esc; the first focus is on *Delete section only*) and the choice is one undo step. - **Sections** (frames that group widgets) move and copy as a block: see [Sections in the builder](/tessera/components/section/#in-the-builder). ### Lock **Lock** a widget (**Inspector → Layout → Lock position and size**, **Lock** in the [context menu](#context-menu), or the lock in its row of the [Layers](#layers) tab) so it can't be moved, resized or deleted from the canvas until you unlock it. A small lock shows on its tile while you edit; the live dashboard never shows it. Selecting, the inspector's other fields (label, data, style…), inline editing, copy and duplicate keep working: a copy of a locked widget is locked too. Locking is one undo step and, on **Apply**, is written to the node as `locked` (an editor-only setting: it is not a property of the widget and never reaches the browser or the flow's messages). - **Every way of moving is covered**: dragging (also on the Phone preview, where it reorders), the size handle, the arrow keys, the *Width*, *Height*, *Column*, *Row* and *Region* fields, **Arrange**, **Move to page**, and **Delete** (key, toolbar, context menu, × on a new widget). The toolbar says why when a gesture skips a locked widget. A selection that mixes locked and unlocked widgets moves, resizes or deletes only the unlocked ones; **Arrange** still aligns to a locked widget (or matches its size) without moving it. - **A locked widget is an obstacle, not a pushover**: the other widgets yield around it, and dragging or resizing one onto it (or into a locked section) stops at the last free spot. Changing the dashboard grid still converts every widget, locked ones included. - **Locking a section locks what it frames**: neither the frame nor the widgets inside it can be moved, resized or deleted. A widget locked inside an unlocked section keeps the section from moving too (it would carry that widget), and *Delete section and N widgets* leaves it out. - Extension widgets whose node doesn't define `locked` can't be locked (the toggle is disabled). The node's `locked` key is listed in `catalog.json` for tools that create nodes. ## Layers The left column has three tabs, **Widgets** (the palette), **Layers** and [**Tags**](#tags). Layers lists the page you are editing as a tree: the **page**, its **regions**, the **sections** in them with the widgets they frame, then the loose widgets. Each row has the widget's icon and label (its type when it has none). The order is the page's reading order, the one the canvas has. Only regions that have widgets are listed. The tab you use is not remembered: the builder opens on **Widgets**. ![The Layers tab: the Control page as a tree, with the Pump cycle section and the widgets it frames, a padlock on the locked Stop button, and a struck-through Output whose eye is off, so it is missing from the canvas](/tessera/img/builder-layers.jpg) *Layers with a section, a locked widget (padlock) and a widget hidden in the editor (struck through).* - **Click** a row to select the widget on the page (**Shift** or **Ctrl + click** adds or removes it, as on the canvas). The other way works too: what you select on the page is highlighted in the tree, scrolled into view and its groups opened. Clicking a region or the page opens and closes it. - **Search** filters by label or type (*gauge*, *section*…), in any case, every word has to match. The matches keep the groups they are in, and a search shows them even when a group is closed. - **Hide in editor** (the eye): the widget disappears from the page you edit, and can't be clicked, so you can reach what is underneath. The tile keeps its place, nothing moves. It is a view of **this builder session only**: it is not stored in the flow, not undoable, never part of **Apply**, never changes the live dashboard, and reloading the builder shows everything again. Hiding a **section** hides its frame; the widgets it frames stay (hide them too if you want them gone). - **Lock** (the padlock) locks and unlocks the widget like the [inspector's toggle](#lock), as one undo step, and shows the state: a widget whose section is locked shows the padlock dimmed (*Locked by its section*). It is disabled for widgets that can't be locked. - **Drag to reorder** (Desktop view): drag a widget row onto another row to put it **before** it (upper half) or **after** it (lower half); a line shows where it lands. Drop it on a **region** row to move it to the end of that region, or on a **section** row to move it **into** the section's frame, in the first free spot that fits (if it doesn't fit, nothing happens and the toolbar says so; a drop on a member row puts it among the members, and a member dropped on a loose row leaves the frame). Dragging a **section** moves it with its widgets, before or after another section or to the end of a grid region. In a grid region the widget takes the cell of the one it goes before and the others yield around it, exactly as when you drag it there on the page (its position stays free: no cell is cleared); in a sidebar or band-like stack region the order changes. Every drop is one undo step. A locked widget (or a section that holds one) can't be dragged and nothing is pushed onto a locked widget; a section doesn't go in a stack region. Dragging works on the Desktop preview only. A click without moving still selects. - **Keyboard**: the tree is an ARIA tree (`role="tree"`). **Tab** enters it on one row (the one you used last); **↑ ↓** move, **→** opens a group and then enters it, **←** closes it and then goes to the parent, **Home** and **End** go to the first and last row, **Alt + ↑ / Alt + ↓** move the widget one place up or down among its siblings (a widget among widgets, a section among sections; the same as a drag, one undo step), **Enter** (or Space) selects the widget, as a click does, or opens and closes a group (**Shift + Enter** adds to the selection). The arrow keys move the focus here, they don't move the selected widget on the page. **Tab** on a row reaches its *Hide* and *Lock* buttons. ## Tags The **Tags** tab lists the tags the [tag table](/tessera/guides/tags/) knows (at most 100; the search narrows them down) with their **live value**, **quality** and **type**, refreshed every two seconds while the tab is showing. **Drag a tag onto the page** to add the widget that suits it, already bound to it and labelled with its key: a **Status** LED for a boolean, a **Stat** (the *Value* widget) for a number, **Text** for anything else. It goes through the same draft as a drop from the *Widgets* tab: one undo step, written as a normal node on **Apply**. The inspector's **Tag** field (under *Behaviour*, on every widget that can be bound) is free text with the known tags as suggestions. The list comes from the Node-RED editor that opened the builder, so the tab needs the builder to be opened from it (*Edit layout*). ## Synoptic editor With a [Synoptic](/tessera/components/synoptic/) selected, **Edit synoptic** (in the inspector, or in the tile's context menu) opens a full-screen editor for its diagram: a symbol palette, pipes that route themselves, tags you drop on a symbol, and a canvas that shows the real tag values while you work. **Apply** in the editor puts the diagram in the builder as one undoable change; **Apply & deploy** saves it as usual. See [the synoptic editor guide](/tessera/guides/synoptic-editor/). ## Context menu **Right-click** a widget, or select it and press **Shift + F10** (or the **Menu** key), to get its menu. Every entry is an action you already have, with the same shortcut and the same single undo step: ![The context menu of the Main pump switch: Duplicate, Copy, Paste, Copy style, Paste style, Move to page, Arrange, Hide on phone, Hide on tablet, Lock and Delete, with their shortcuts; the entries that do not apply are dimmed](/tessera/img/builder-context-menu.jpg) | Entry | Does | |---|---| | **Duplicate** (Ctrl + D), **Copy** (Ctrl + C), **Paste** (Ctrl + V) | As the shortcuts. Paste is disabled until you copy something. | | **Copy style** (Ctrl + Alt + C), **Paste style** (Ctrl + Alt + V) | The style of the first selected widget onto the selection. Disabled for a widget with no style, or when nothing was copied or nothing applies. | | **Move to page ›** | Lists the other pages; the selection goes below everything on the one you pick. | | **Arrange ›** | Align, distribute and match size (see [Arrange](#arrange)) for two or more widgets of the same grid region; *Distribute* needs three. Disabled otherwise, and in the Tablet and Phone previews, which don't move cells. | | **Hide on phone**, **Hide on tablet** | Hide the selection on that device (the entry reads **Show on…** when every selected widget is already hidden there). | | **Lock** / **Unlock** | Locks the selection (see [Lock](#lock)); the entry reads **Unlock** when every selected widget is locked. | | **Delete** (Del) | Deletes the selection, asking first for wired nodes. | Right-clicking a widget that isn't selected selects it first; right-clicking inside a multi-selection keeps it, and the menu acts on all of it. **Right-click on the empty page** (or Shift + F10 with nothing selected) offers **Paste**, **Add widget…** (shows the Components palette and focuses its search; needs the Desktop preview, like dragging from the palette) and **Select all**. Entries that don't apply are shown dimmed, not hidden. Use **↑ ↓**, **Home** and **End** to move, **→** to open a submenu and **←** to leave it, **Enter** or **Space** to run an entry and **Esc** to close it (the selection stays and the focus goes back where it was). The menu also closes when you click elsewhere, scroll or resize the window, and always stays inside the window. Double-click editing, dragging and resizing work as before; inside a text field and over the palette, toolbar or inspector you still get the browser's own menu. ## Pages The **Pages** button in the toolbar opens the page list: ![The pages panel: each page with its widget count and the move up, move down, duplicate and delete buttons, and a field to add a page](/tessera/img/builder-pages.jpg) - **Add** a page (it opens right away), **rename** it inline, **reorder** it with the arrows. - **Duplicate** a page (the copy icon): the page and all its widgets, deployed or not yet applied, go to a new page titled *… (copy)* with the path `-copy` (`-copy-2`, `-copy-3`… when taken), right after the original in the navigation. Widgets are copied without wires, with their settings and positions; on Apply they become nodes in the *Tessera UI* flow, in a group for the new page. One undo step. - **Delete** empty pages. A page that still has widgets can't be deleted: move or delete them first. - **Move widgets to another page** by dragging one onto that page's link in the navigation, or select widgets and use **Move to…** in the toolbar. On a narrow window the toolbar drops it: **More** → *Selection* → **Move to page**. ### Reusable templates In **Pages**, choose **Save page** or select widgets and choose **Save selection** to store a reusable page or block on this dashboard. A section includes the widgets it frames. Templates preserve supported properties, regions and desktop/phone geometry, but never copy wires or topics. Custom Template code is omitted; its position is kept as an inert text marker you can replace. Rename or delete saved templates in the same panel (a name is trimmed and has at most 80 characters). A saved page is available alongside the built-in page templates in **Components**, and can also be inserted into the current page; saved blocks can be inserted there too. Inserting a saved page into an **empty** page also replaces that page's layout with the template's; on a page that already has widgets, only the widgets are added to the regions it has. **Export JSON** shows the portable document to copy and share. Paste a document into **Import template JSON** to validate and add it. Every failure (invalid JSON, an unreadable library, a rejected save) is reported in an alert inside the *Reusable templates* section, the typed text stays so you can fix it, and the saved library and builder history are not changed. Template edits are drafts: undo, redo, *Revert*, **Apply** and **Apply & deploy** work like other dashboard settings. A template records the grid (columns and row height) of the dashboard it was saved on, and inserting it converts positions and sizes to the grid of the dashboard you insert into, as pasting does. Image, camera and embed widgets are saved without their `src` and with the default embed sandbox, since the endpoint belongs to the flow: set it again after inserting. If a saved template refers to a widget type missing from this installation's catalog or disabled in Node-RED's palette, the builder preserves it for future use but marks it unavailable, names the missing types and disables insertion and page creation; it can still be renamed, exported and deleted. An inert custom Template marker becomes text, so it only needs the text widget type enabled. If the stored library cannot be read (a newer version, or edited by hand), the builder leaves it untouched in Node-RED, says so and refuses to change it. This does not relax validation of imported JSON. ### From the Node-RED editor The **Tessera** tab in the editor sidebar manages pages too, without opening the builder: - The **⋯** menu of a page: **Edit page…** (title, path, icon, layout), **Duplicate** (a copy of the page and its widgets, not wired, in the *Tessera UI* flow, with the path `-copy`, as in the builder) and **Delete** (the page and its widgets, after asking). - The **⋯** menu of a dashboard: **Add page** (a new empty page, last in the navigation), **Edit dashboard…** (title, path, theme, navigation) and **Delete empty pages**. A dashboard without pages shows an **Add page** button too: add one and **Edit layout** is there. - The arrow next to **Open dashboard** (↗): **Desktop**, **Tablet** or **Phone** opens the live dashboard in the [device preview](#on-the-live-dashboard) (`?preview&device=…`); the button itself opens it as viewers see it. - Drag **≡** to **reorder** the pages. - Badges flag pages that need a look: **empty** (no widgets) and **same path** (two pages of a dashboard on the same path: only one of them can be shown; change one in *Edit page*). Each action is one normal editor change: undo it with Ctrl+Z (click the canvas first) and deploy to publish. :::tip[Pages outlive deleted flows] Pages and dashboards are Node-RED **configuration nodes**: they don't belong to a flow, so deleting every flow leaves them behind, and importing the example over an existing dashboard adds a second set. Clean up with **Delete empty pages**, or from the editor's *Configuration nodes* sidebar (filter **unused**). ::: ## Dashboard settings The **Settings** button in the toolbar (*Dashboard settings*) opens one dialog with everything that applies to the page or the whole dashboard, in four tabs. It keeps the same height whatever the tab, and **Esc** closes it. | Tab | What it has | Applies to | | --- | --- | --- | | **Layout** | the page's template (seven: grid, sidebars, bands, columns), *Fit to screen* and *Full width*; the grid preset, columns and row height, and the columns of the Tablet and Phone previews | the page (*This page*); the grid and the devices (*All pages*) | | **Navigation** | the navigation style (top bar, sidebar, sidebar + top bar) and *Kiosk by default* (full screen) | *All pages* | | **Appearance** | the **theme**, the **accent**, the branding (**title**, **short name** and **logos**) and the **style**: **font**, **density** and **corner radius** | *Dashboard* | | **Advanced** | the **custom CSS** (unsupported) | *Dashboard* | A label next to each group says what it changes: *This page*, *All pages* or *Dashboard*. Details in [Layout](/tessera/concepts/layout/). ![The Dashboard settings dialog on its Layout tab: the page layouts, Fit to screen and Full width, and the grid presets, with the Navigation, Appearance and Advanced tabs beside it](/tessera/img/builder-settings.jpg) The tabs are the [WAI-ARIA tab pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/): Tab goes to the tab list once and into the panel next; **←**, **→**, **Home** and **End** move between tabs. **Changes since the last Apply** show twice, from the same draft that drives the toolbar's *N changes*: a number on each tab (how many of its settings differ from what the editor has) and a dot beside each changed setting. Putting a value back, **Undo** and **Revert** take them away. ### Branding ![The Appearance tab of Dashboard settings with a custom accent, a short name and two logos typed in: each changed field has a dot, the tab shows a count of 4 and the accent field is outlined in the new colour](/tessera/img/builder-branding.jpg) *Drafts on the Appearance tab: the canvas already uses the new accent.* The *Appearance* tab has the **accent** (the four presets, a hex field and a colour picker), the **title**, the **short name**, the **logo** and the **logo for the dark theme** (picked from the [media library](/tessera/guides/media-library/) with the image button next to the field, or a path such as `/logo.svg` or an `http(s)` address); the advanced, **unsupported** **custom CSS** is in *Advanced*. Each field takes its value when you leave it (Tab or Enter); one the runtime would drop (`javascript:`, `data:`, `//host`, a colour that is not a preset or `#rrggbb`, text over the limits) is refused with the reason and the draft keeps what it had. Like any other change these are drafts: undo, redo and *Revert* work on them, and **Apply** writes them to the app node (`tessera-base`) as one undoable edit in the Node-RED editor, the same fields as its dialog. The canvas previews the accent (with the same text-on-accent and soft colours the dashboard gets, in both themes), the title and the logos before you apply. The **custom CSS** shows on the dashboard after **Apply & deploy**. See [Branding](/tessera/concepts/theming/#branding). ### Style: font, density and corner radius ![The Appearance tab of Dashboard settings scrolled to its Style group: Serif, Compact and a Large corner radius are chosen, each changed control has a dot, and a sample tile pinned at the bottom shows the result](/tessera/img/builder-style.jpg) *The Style group, with a non-default choice: the sample at the bottom follows it.* The *Style* group at the end of the *Appearance* tab has three controls, each a row of buttons: - **Font**: System, Humanist, Geometric, Serif, Monospace (each button is drawn in its own stack) or **Custom (woff2)**, which asks for a **Family name** and a **Font file** (a path that starts with `/`, such as `/fonts/plant.woff2`, served by Node-RED through `httpStatic`; one the runtime would drop is flagged *Not applied* with the reason and never previewed). - **Density**: Normal or Compact. - **Corner radius**: None, Small, Normal or Large. A sample tile pinned at the bottom of the tab shows the draft, and the canvas previews it too. The preview is **only the dashboard**: the palette, the inspector, the toolbar and the dialog keep their own look, also when a font is already deployed. **Normal** (and **System**) is today's look; picking it again takes the setting back to the default. They are drafts like the branding (undo, redo, *Revert*, a dot per changed control, and **Apply** writes them to `tessera-base` as one undoable edit). See [Font, density and corner radius](/tessera/concepts/theming/#font-density-and-corner-radius). ## Preview on tablet and phone The three buttons next to the settings button (**Desktop**, **Tablet** 768 px, **Phone** 390 px) show the page being edited inside a frame of that width, centered, so you see the tablet or phone layout (columns, spans, stacked regions) while you edit, without resizing the browser window. **Desktop** is the full width, as always. Only the page is previewed: the navigation and the builder panels keep following the window. Beside the buttons, the **device list**, grouped under *Phones* (iPhone SE 375×667, iPhone 15 393×852, Pixel 8 412×915, Galaxy S24 360×780) and *Tablets* (iPad mini 744×1133, iPad Air 820×1180, Galaxy Tab S9 800×1280), picks a real device, like the browser's dev tools; its size shows in the **width** and **height** fields. Once a device is shown, the **width** and **height** fields next to the list set any size (240–3840 px; the list then reads *Custom*), and you can **drag the frame**: its right edge changes the width, its bottom edge the height and its corner both (the frame is centered, so the width moves by twice the drag). The edges are buttons too: focus one and use the arrow keys (10 px, Shift for 50). The **height** is honoured: the page scrolls inside the frame, so you see what is above the fold. A frame wider than the page column runs under the inspector: type its width instead of dragging. The region **width handles** of the page layouts (sidebars, columns) are desktop chrome: they show only while the frame shows the desktop layout (1024 px and wider), since tablet and phone lay the regions out in one column. The choice is remembered in this browser. ![The builder in the Tablet preview: the page inside a 768 px frame, the sidebar region stacked under the main grid, and the device controls with their width and height fields in the toolbar](/tessera/img/builder-device-tablet.jpg) ![The builder in the Phone preview: the page inside a 390 px frame, the KPIs in two columns and the gauge and the chart full width](/tessera/img/builder-device-phone.jpg) The **rotate** button turns the frame to landscape by swapping its width and height (Phone 844 × 390, Tablet 1024 × 768; click again to go back). The page reacts to the frame's width like on a real device: a landscape phone shows the tablet layout and a landscape tablet the desktop one. There is no rotate button, nor size fields, on **Desktop**. The page's breakpoints (phone under 768 px, tablet 768–1023 px, desktop from 1024 px) follow the window on a dashboard, as always. In a preview the frame lays the page out by its own width, with the same breakpoints, so the preview matches a browser window of that width. The per-device settings (hide, phone order, phone height) apply in the tablet and phone previews, and you edit them there. Editing follows the layout the frame shows, not the button or the device: whatever the width (dragged or typed), phone is under 768 px, tablet 768–1023 px and desktop from 1024 px; a rotated phone is edited like the **Tablet** preview below and a rotated tablet like **Desktop**, so a gesture never writes keys for a layout other than the one on screen (see [Per device](/tessera/concepts/layout/#per-device)): - **Phone preview**: **drag** a widget to reorder it inside its region. This writes `phoneOrder` (the region's widgets are renumbered so the result is the order you see; a widget that ends up in its reading position stays automatic) and never touches `col` or `row`. The **corner handle** changes only the rows on phones (`phoneHeight`, shown as ↕3 on the widget); the width is always the full one. Each gesture is one undo step (and redo), and **Apply** writes only those keys: the desktop layout is not changed. Widgets can't change region or page in the phone preview, and the arrow keys don't move widgets there. - **Hidden widgets show as ghosts**: a widget hidden on the device being previewed stays on the page, faded and hatched, with a *hidden on phone* (or *tablet*) label, so you can still select and edit it. Ghosts exist only in the builder: the dashboard hides the widget. - **Tablet preview**: the tablet has no order or size of its own, so it shows the desktop layout. Selecting, the inspector and the hide toggle work; dragging and resizing are disabled (a drag shows a hint and moves nothing), so a tablet-preview gesture can never change the desktop layout. Switch to **Desktop** to arrange. - **Inspector → Phone and tablet** (every preview, for the whole selection): **Hide on phone**, **Hide on tablet**, **Phone order** and **Phone rows**. Clear the two number fields to go back to automatic. The **Width**, **Height**, **Column** and **Row** fields above them are the desktop layout: while the preview shows the tablet or the phone layout they are read-only, with an *Edit on Desktop* hint (switch to **Desktop**, or rotate a tablet to landscape, to edit them), so they never write the desktop cells from another layout. The **align, distribute and match size** bar is disabled there too, like **Arrange** in the context menu. - New widgets come from the palette on the **Desktop** preview. Pasting or duplicating keeps the hidden devices and phone rows; the phone position is kept only by duplicate, and a copy or move to another page starts in reading order. ### On the live dashboard The same device frame and controls are available on the live dashboard, for authors: open it with **`?preview`** in the address (`/tessera/?preview`), and optionally **`&device=desktop`**, **`tablet`** or **`phone`** (or any id of the device list, such as `iphone-15`) to start on that device: `/tessera/?preview&device=phone#/overview`. A small bar at the bottom of the page has the Desktop, Tablet and Phone buttons, the device list, the width × height fields and rotate, and the page shows inside the frame as in the builder (with the same layout as a browser window of that width, including what you hide per device). The widgets are the live ones: switches, sliders and buttons work and their events reach the flow. There is no editing. **Desktop** is the normal view. The choice is remembered in this browser (shared with the builder); `?device=` overrides it. Operators never see this: without `?preview` the dashboard has no such button and does not even download the preview. In the Node-RED editor sidebar, the arrow next to **Open dashboard** opens the page as a **Desktop**, **Tablet** or **Phone** preview; a plain click of the button still opens the dashboard as before. ## Sample data The **Live | Sample** toggle in the toolbar (right of the device buttons — or in the **More** menu's *Preview* section when the toolbar is narrow) makes every widget on the edit canvas show its **sample** state, the same one the palette previews use (an extension widget shows its `catalog.sample`), charts included. It works in the Desktop, Tablet and Phone previews, and helps to judge a layout before real data arrives, or to take a screenshot for your docs. A widget with no sample (a button, a section) keeps its live state. ![The builder with Sample selected in the toolbar: every widget shows its sample state, so the KPIs, the gauge, the chart, the switches and the slider have the values of the catalog instead of the live ones](/tessera/img/builder-sample.jpg) Sample is only a view of your builder session: nothing is saved, applied or sent to the flow (*Apply* still says *No changes*), other browsers keep seeing the live dashboard, and a reload goes back to **Live**. While it is on, widgets don't send events: a switch or slider you move in the preview does nothing to the flow. Live data keeps arriving underneath, so **Live** shows the current state at once. ## Apply and deploy The toolbar summarises your changes, e.g. *2 new · 1 deleted · 5 changed*. - **Apply** sends everything to the Node-RED editor as one undoable step. New widgets become configured nodes (page, region, size, position, label…) in a flow called **Tessera UI**, with **one group per page**. Open it and wire them to your logic. - **Apply & deploy** does both. The builder says *Deployed to Node-RED* only when Node-RED confirms the deploy, and *did not confirm* (with what to check) when it does not. If a node in the Node-RED editor is not properly configured, Node-RED itself would ask for a confirmation in the editor tab, so the builder does not deploy: your changes stay applied there and it names the nodes. Fix them in the editor (*Search for invalid nodes*) and deploy. - Until you deploy, the builder marks applied widgets as **not deployed**, even if you close and reopen it. - **Ctrl + Z** in the Node-RED editor undoes a whole Apply, including created nodes, groups and the flow. - **View** opens the current page of the live dashboard in another tab, as viewers see it. It shows what is **deployed**: a dot on the button means there are changes it doesn't show yet. To see it on a phone or tablet, add `?preview` to its address (see [On the live dashboard](#on-the-live-dashboard)). ![The Tessera UI flow after Apply: the new widgets of the Control panel page in a group named after the page, ready to wire, and the notice that says so](/tessera/img/editor-tessera-ui.jpg) ## Version history The **clock** button of the toolbar opens the **Version history** panel: every deploy that changes the dashboard saved a version, and you can name one, preview it read-only and **restore** it (one **Ctrl + Z** in the Node-RED editor undoes the restore). See [Version history](/tessera/guides/version-history/). ## Keyboard shortcuts The **?** button in the toolbar lists them too. | Shortcut | Action | |---|---| | Click / Shift + click | Select / add to the selection | | Ctrl + A | Select every widget on the page | | In the Layers tree: ↑ ↓ → ← Home End | Move over the rows, open and close groups, go to the parent | | In the Layers tree: Enter | Select the widget (Shift + Enter adds), or open / close a group | | In the Layers tree: Alt + ↑ ↓ | Move the widget one place up or down among its siblings | | Enter / double-click | Edit the title (a Text: its text; a Button: its caption) in place. Enter saves, Esc cancels | | Drag | Move (drop on a page link to move it to that page) | | Corner handle | Resize | | Arrow keys | Move the selected widget one cell | | 2+ widgets selected | Align, distribute and match size (to the first selected) from the bar above the toolbar | | Delete | Delete the selection | | Ctrl + D | Duplicate the selection | | Ctrl + C / Ctrl + V | Copy the selection, paste it on this or another page | | Ctrl + Alt + C / Ctrl + Alt + V | Copy the style of the first selected widget, paste it on the selection | | Ctrl + Z | Undo | | Ctrl + Shift + Z / Ctrl + Y | Redo | | Esc | Clear the selection, close panels | ## After upgrading Tessera A Node-RED editor tab that was open before you upgraded keeps running the old code until you reload it. The builder notices: it shows a warning and disables Apply. Reload the editor tab (F5), then press **Reconnect** in the builder — your pending changes are kept. --- # Getting started Source: https://fgjcarlos.github.io/tessera/getting-started Install Tessera and build your first dashboard in five minutes. ## Install From your Node-RED user directory (usually `~/.node-red`): ```bash npm install @fgjcarlos/node-red-tessera ``` Restart Node-RED. A new **tessera** category appears in the palette. :::note Tessera is in early development (v0.x). Expect breaking changes until 1.0. ::: ## Try the demo In Node-RED open **Menu → Import → Examples → @fgjcarlos/node-red-tessera → tessera-demo**, deploy, and open **http://localhost:1880/tessera**. It simulates a small plant: live values, a chart, controls, a batches table, a production page (text, status, progress, dropdown, inputs and notifications) and a shift page (date range, bar and pie charts, an alarm list and a template) and a media & forms page (a pre-filled form, an image, a camera and an embedded page, all served by the flow itself, so it works offline). Smaller examples, one per feature, are in the same menu: see [Examples](/tessera/guides/examples/). ## Your first dashboard 1. Drag a **stat** node onto the workspace and open it. 2. Next to **Page**, click the pencil to create a page. Inside it, create the **app** (title, theme, accent). 3. Wire an **inject** node (repeat every second, payload `$random() * 100` as JSONata) into the stat. 4. Deploy and open **http://localhost:1880/tessera**. The value updates live. Open the page in a second browser: both stay in sync. ## Build visually Instead of configuring widgets one by one, open the [visual builder](/tessera/builder/): in the Node-RED editor, **Tessera** tab in the right sidebar → **Edit layout**. Drag widgets or a whole page template onto the page, arrange them, set their properties, then **Apply**: the new widgets appear as nodes in a **Tessera UI** flow, ready to wire. ## Add controls Input widgets (**button**, **switch**, **slider**, **dropdown**, **input**, **date / time**, **form**, **table** row clicks, **bar**/**pie** clicks and **alarm list** acknowledgements) send a message when someone uses them: ```json { "payload": true, "topic": "pump", "_client": { "id": "c3-lq0z1" } } ``` Wire them into your logic, and wire your logic back into any widget to display results. ## Choose what's in your palette Tessera's nodes come in groups, one per category. In Node-RED open **Menu → Manage palette → Nodes**, find `@fgjcarlos/node-red-tessera`, and disable the groups you don't use: their nodes leave the Node-RED palette and the builder's palette. | Group | Nodes | |---|---| | `tessera` (always on) | base, page, notification, section | | `tessera-indicators` | stat, text, status, progress, gauge | | `tessera-charts` | chart, bar, pie | | `tessera-data` | table, alarm list | | `tessera-controls` | button, switch, slider | | `tessera-inputs` | dropdown, input, date / time, form | | `tessera-media` | image, camera, embed | | `tessera-advanced` | template | Turning a group off doesn't make your dashboards smaller or faster: a browser only ever downloads the widgets its pages use. It just keeps the palette tidy. - Node-RED won't disable a group while its nodes are in your flows (the button shows **in use**). Delete those nodes and deploy first. - Templates that need a disabled widget are hidden in the builder. The tessera-demo example uses every group. :::caution If you import or deploy a flow that uses a node from a disabled group, Node-RED stops **every** flow, not just Tessera's, and logs `Waiting for missing types to be registered`. To recover, enable the group again in **Manage palette**: the flows start right away, no restart needed. ::: ## Next steps - [Messages](/tessera/concepts/messages/): the full `msg.payload` / `msg.ui` contract. - [Layout](/tessera/concepts/layout/): sizing widgets on the grid (12 columns by default). - [Examples](/tessera/guides/examples/): importable flows, one per feature. - [Components](/tessera/components/stat/): every widget with live examples. - [Choose what's in your palette](#choose-whats-in-your-palette): disable the groups of nodes you don't use. --- # Layout Source: https://fgjcarlos.github.io/tessera/concepts/layout The grid, navigation styles, page layouts and regions. ## The grid Each page is a grid of **12 columns with 104 px rows**, unless you pick another grid for the dashboard (see [Grid size](#grid-size)). Every widget has: | Property | Meaning | |---|---| | `width` | columns, 1 to the number of columns | | `height` | rows | | `col`, `row` | the cell of its top-left corner, counted from 0 | | `order` | reading order: phones and sidebars follow it | | `region` | `main` grid or the page `side`bar | In a grid region, a widget with `col` and `row` stays in that cell: it can sit on any row, with empty cells around it, and widgets never overlap. The builder sets them when you drag a widget, and pushes down what it lands on. Widgets without `col`/`row` (dashboards made before Tessera 0.4, or nodes created by tools without a position) flow left to right, top to bottom, in `order`. The builder gives them their cells the first time you edit the page, where they already are, so nothing moves. ## Grid size For finer steps, pick another grid for the whole dashboard: in the builder, open **Dashboard settings** (toolbar) → *Layout* → **Grid**, or **Dashboard settings…** in the inspector. | Grid | Columns | Row height | |---|---|---| | **Normal** (default) | 12 | 104 px | | **Fine** | 24 | 44 px (two rows and their gap = one normal row) | | **Extra fine** | 48 | 20 px (four rows and their gaps = one normal row) | | Custom | any whole number from **4 to 48** | **16–240 px** | The gap between cells is 16 px up to 24 columns and **8 px above**. Values outside the range are clamped (a hand-edited `gridCols: 16` is a valid 16-column grid; only a value that is not a number falls back to 12). Changing the grid in the builder **converts every widget** (size and cell) and every region's minimum height, so pages keep their look; it's one undo step. Between Normal, Fine and Extra fine the conversion is exact (Normal ↔ Extra fine: 4 rows of 20 px and 3 gaps of 8 px are the 104 px of a normal row); for other counts (12 → 10, say) sizes and cells are rounded and what then overlaps is pushed down. The *app* config node (`gridCols`, `rowHeight`, `tabletCols`, `phoneCols`) has the same settings, but there they're just numbers: the widgets aren't converted. ## Arrange visually You don't have to type numbers: the [visual builder](/tessera/builder/) lets you drag, resize and configure widgets on the real page, and pick layouts and navigation with thumbnails. ## Navigation Choose how people move between pages on the **app** config node, or visually from the layout editor (toolbar → **Dashboard settings** → *Navigation*). Every style has a full-screen button next to the theme switch (see [Kiosk](#kiosk)). ### Top bar A classic website header: brand on the left, page links with an underline on the current page, status and theme on the right. With many pages the links scroll horizontally; on phones they fold into a menu. ![Top bar navigation: the brand and the page links on the left; the connection status, the theme switch and the full-screen button on the right](/tessera/img/nav-topbar.jpg) ![The top bar on a phone: the page links folded into a menu under the header](/tessera/img/nav-topbar-mobile.jpg) ### Sidebar A vertical menu with page icons. The button at the bottom **collapses it to an icon rail**; each viewer's choice is remembered in their browser. On phones it becomes a drawer. ![Sidebar navigation: the page links with their icons, and at the bottom the connection status, the theme switch, the full-screen button and the collapse button](/tessera/img/nav-sidebar.jpg) ![The sidebar collapsed to an icon rail, with the status, theme, full-screen and expand buttons at the bottom](/tessera/img/nav-sidebar-collapsed.jpg) ### Sidebar + top bar The sidebar plus a header that shows the current page's icon and title, the connection status and the theme switch. ![Sidebar and top bar: the sidebar with the page icons, and a header with the current page's icon and title, the status, the theme switch and the full-screen button](/tessera/img/nav-sidebar-topbar.jpg) ### Page icons Give each page an **icon** (any [Lucide](https://lucide.dev/icons) name) on the **page** config node. Sidebars always show icons; the top bar shows them when set. ## Kiosk Kiosk is the app in **browser full screen**, nothing else: the page gets the whole display and the dashboard's navigation (top bar or sidebar) stays where it is, so people can still go to any page. It works with every navigation style. - **Per screen**: open the dashboard with `?kiosk` (for example `/tessera/?kiosk`) to turn it on, or `?kiosk=0` to turn it off. - **Kiosk by default** on the **app** config node (off unless you turn it on): every screen starts in kiosk unless it is opened with `?kiosk=0`. Set it in the layout editor too (toolbar → **Dashboard settings** → *Navigation*). - **The first click, tap or key press** puts the browser in full screen. Browsers only allow full screen after a user gesture, so a page cannot do it by itself on load; it asks once, and if you leave full screen (Esc) it does not ask again. - **The full-screen button** (⛶) in the navigation enters and exits full screen on any dashboard, kiosk or not. It is hidden in browsers without the Fullscreen API (for example iPhone Safari). - **Unattended screens** (a wall display, a panel that restarts on its own) cannot wait for a click: start the browser itself in kiosk mode, for example `chromium --kiosk http://localhost:1880/tessera/`. :::note[Older dashboards] Up to 0.4 *Kiosk* was a navigation style (`nav: 'kiosk'`). Those dashboards keep working: they behave as **Top bar** with **Kiosk by default**, and the Node-RED dialog shows them that way. Tools that still write `nav: 'kiosk'` keep working, but the value is deprecated: write `nav: 'topbar'` and `kioskDefault: true`. That style hid the navigation and could rotate pages (*Rotate pages*, `kioskRotate`): both are gone, the navigation is always visible and the old rotation settings are ignored. ::: ## Page layouts Each page uses a **template** of regions. Pick it from the layout editor's toolbar (thumbnails) or on the page config node. | Template | Regions | |---|---| | **Grid** | main grid | | **Sidebar left / right** | main grid + a sidebar column | | **Top band** | a full-width band (great for KPIs) above the main grid | | **Band + sidebar** | band, then main grid + sidebar | | **Three columns** | left column + main grid + right column | | **Two columns** | two grids side by side | | **Process screen** | one region: the first widget fills the whole screen under the header (see [Process screen](#process-screen)) | Widgets choose their **Region** (main, sidebar, top band, left/right column, second column), or you drag them between regions in the layout editor. If a page switches to a template without that region, its widgets show in the main grid and keep their region for later. Sidebar and column widgets take the full width of their column; only their height applies. Sidebars stay in view while you scroll. ### Process screen The **Process screen** template is for plant graphics, as in a SCADA: the process drawing *is* the screen. Put a [synoptic](/tessera/components/synoptic/) on the page and it fills the whole area under the header and navigation, edge to edge and with no page title, whatever its width and height in the grid. The synoptic frames what is drawn and scales to the area, so the graphic uses all the space and there is no scrolling on a desktop. Navigate between screens with the page links, one page per graphic. - It works with any widget, but the first one is the only one that fills the screen: it is the first of the page in reading order (`order`; drag in the builder to change it). Further widgets in the page stack below it, one per row at the full width, with their own height, and the page scrolls to them. Keep one widget on a screen for a clean full-screen graphic. - Below 1024 px (tablet and phone) the first widget keeps a 4:3 box at the full width and the page scrolls, instead of taking the height of the window, which would be a thin strip on a phone in landscape. - *Fit to screen*, *Full width* and the grid sizes are not used by this layout. Other layouts and their widgets are unchanged. - In the builder the first widget shows *fills the screen* instead of its size and has no resize handle; the page keeps its title and padding so the toolbar and the region label stay reachable. The **Process screen** page template adds a page with one synoptic. ### Resizing regions In the layout editor every region is outlined with a dashed line: - **Width**: drag the handle between a sidebar or column and the main grid. Sidebars snap to 240 – 560 px; two columns snap to 25 / 33 / 40 / 50 / 60 / 67 / 75 %. - **Height**: drag the handle on a region's bottom edge to give it a minimum height in rows. Double-click the handle to go back to automatic height. ### Page options - **Fit to screen**: the page fills the window with no scrolling and the rows share the available height. Ideal for HMI screens and wall displays (desktop only; phones keep scrolling). - **Full width**: use the whole screen instead of a centered 1600 px column. ## Mobile Below 768 px the grid becomes **4 columns** (configurable, see [Tablet and phone columns](#tablet-and-phone-columns)) and widgets go one after another in reading order (row by row, left to right), ignoring their columns: - compact widgets (stat, switch, button) that are a quarter of the grid (3 columns of 12) or narrower and 1 row tall (up to 120 px) take **half** the columns; - everything else takes the **full** width; - page sidebars stack below (right) or above (left) the grid. ### Tablet and phone columns The *app* config node (and **Dashboard settings** → *Layout* → **Grid**, in the builder) sets the columns of each device: | Setting | Default | Range | Meaning | |---|---|---|---| | `tabletCols` | `0` | `0`, or **4–16** | Columns of a tablet (768–1023 px). `0` = **follow the desktop grid**: widgets keep their cells, as always. A number: the tablet has its own columns, and widgets **auto-flow in reading order** with their width scaled to that count (rounded, at least 1 and at most the count), with a 16 px gap | | `phoneCols` | `4` | **2–8** | Columns of a phone (under 768 px). Compact widgets take half of them (rounded down), the rest all; 12 px gap | Values outside the range are clamped. A dashboard without these keys looks exactly as before (tablet = desktop grid, phone = 4 columns). The builder's Tablet and Phone previews show the same layout as a window of that width. ### Per device Optional, per widget, to tune the phone and tablet layouts (empty = the same as desktop). A phone is a window under 768 px wide, a tablet 768–1023 px: | Property | Meaning | |---|---| | `hideOn` | `phone` and/or `tablet`: the widget is not shown on those devices (in the editor, pick them in **Phone → Hide on**) | | `phoneOrder` | its position on phones, counted from 0. A widget without it keeps its reading position; on a tie, the widgets with `phoneOrder` go first | | `phoneHeight` | rows on phones instead of `height` | A [section](/tessera/components/section/) is a header followed by its members, as one block, on phones and on tablets with their own columns: its `phoneOrder` places the block and the members' `phoneOrder` orders them inside it. For example, `phoneOrder: 0` brings a widget to the top of a phone, and `phoneHeight: 3` gives a chart more room there. In the [builder](/tessera/builder/) you set them from the Phone and Tablet previews (drag to reorder, corner handle for the rows) and from the inspector, with hidden widgets shown as ghosts. ## Recommended sizes | Widget | Size | |---|---| | stat, switch, slider, button | 3 × 1 | | gauge | 3 × 3 | | chart | 6–12 × 3 | --- # Messages Source: https://fgjcarlos.github.io/tessera/concepts/messages The message contract shared by every Tessera widget. Every widget understands the same three things. Learn them once, use them everywhere. ## `msg.payload`: the value Sending a message with a `payload` sets the widget's value: | Widget | Payload | |---|---| | stat, gauge | number (or text, for stat) | | switch | boolean (`true`/`false`, `"on"`, `1`…) | | slider | number | | chart | number, appended to the series named by `msg.topic`. `[]` clears the chart | The runtime **stores the last value**, so browsers that open the page later see it straight away. A value can also reach a widget by name instead of by wire: set the widget's `tag` and the runtime feeds it through this same `msg.payload` path. See [Tags](/tessera/guides/tags/). ## `msg.ui`: properties at runtime Any property you can set in the editor can be changed from a flow: ```js // disable a button and relabel it while the pump is off return { ui: { disabled: true, label: 'Pump stopped' } }; ``` Common properties: `label`, `disabled`, `visible`, `unit`, `min`, `max`, `variant`. A message may carry `ui`, `payload` or both. ## Output messages Input widgets emit when a user interacts: ```json { "payload": 24.5, "topic": "setpoint", "_client": { "id": "c3-lq0z1" } } ``` `topic` comes from the node configuration. `_client.id` identifies the browser that triggered the event. ## Replying to one browser If a message sent **to** a widget carries `_client.id`, it is delivered **only to that browser** and is not stored. That makes per-user feedback trivial: keep `_client` on the message as it flows through your logic. --- # Theming Source: https://fgjcarlos.github.io/tessera/concepts/theming Dark and light themes, accent colors and design tokens. ## Theme and accent Set them on the **app** config node: - **Theme**: `dark`, `light` or `system`. Viewers can still toggle from the header; their choice is remembered per browser. - **Accent**: `teal`, `blue`, `violet`, `amber` or any colour (see [Branding](#branding)). Try the theme switch at the top of this page: the live demos follow it. ## Branding Also on the **app** config node (the dialog has a colour picker with the four presets as quick picks): | Field | What it does | |---|---| | **Accent** | A preset, or any hex colour (`#rrggbb` or `#rgb`). | | **Logo**, **Dark logo** | An image URL shown in the top bar and the sidebar, with the title as its alt text. The dark one is used in the dark theme when set. | | **Title** | The header text and the browser tab title. | | **Short name** | The short app name, for the home screen once the dashboard is installable as an app. | | **Custom CSS** | Advanced and **unsupported** (see below). | **Custom accent.** The server derives the whole accent set from your colour, for dark and light: the colour of text on it (`--accent-fg`), the soft background (`--accent-soft`) and the first chart series. It nudges the lightness (never the hue) so that text on the accent and the accent on every surface (page, tiles, the selected link) reach WCAG AA, 4.5:1. A very light colour is darkened on the light theme and a very dark one lightened on the dark theme, so what you see can differ a little from what you typed; the presets are unchanged. Nothing is computed in the browser, so the dashboard does not get heavier. **Logos** come from the [media library](/tessera/guides/media-library/) — pick one with the image button next to the field (the dashboard's files, uploaded from the browser, `media/`) — or are a path relative to the dashboard (`/logo.svg`, served from Node-RED's `httpStatic` folder, so it works offline) or an `http(s)` URL. Anything else (`data:`, `javascript:`, `//host/…`) is ignored, with a warning in the Node-RED log. A relative path (`logo.svg`) resolves against the dashboard path and usually 404s. **Custom CSS** is appended to one stylesheet, `//brand.css` (same origin, no CDN), loaded after the theme. It can restyle anything with the tokens below, but it is **not supported**: class names and structure may change between versions, so check it after you upgrade. Colors should still come from the tokens (`var(--accent)`), so both themes keep working. A deploy that changes any of this updates open dashboards without a reload (the stylesheet URL carries a version). ![A dashboard in the dark theme with an orange accent and a logo of four tiles next to the title in the top bar; the switch, slider, chart line and gauge use the orange accent](/tessera/img/theming-branding-dark.jpg) ![The same dashboard in the light theme: the orange accent is darkened so text and controls keep their contrast, and the logo is the one for light backgrounds](/tessera/img/theming-branding-light.jpg) *A custom accent (`#f76707`), a logo and a dark logo, in both themes. The light theme gets a darker orange, as described above.* ## Font, density and corner radius Three more settings on the **app** config node (and in the builder's *Dashboard settings → Appearance → Style*) change how the whole dashboard looks, with no per-widget work. Each one is optional: **Normal is today's look**, a dashboard without them renders exactly as before and the stylesheet gets nothing for it. | Field (`tessera-base`) | Values | What it does | |---|---|---| | **Font** (`font`) | System (empty), `humanist`, `geometric`, `serif`, `mono`, `custom` | The font of the dashboard, charts included. | | **Family name**, **Font file** (`fontFamily`, `fontUrl`) | text, a `.woff2` path | Only for `custom`: the name you give the font and the file. | | **Density** (`density`) | Normal (empty), `compact` | Compact tightens the paddings, gaps and control heights (to 62.5%, 67% and 82% of Normal). | | **Corner radius** (`radius`) | None, Small, Normal (empty), Large | Scales the corners of tiles, widgets, controls, dialogs and notifications (0, 45%, 100%, 155% of Normal). | **Fonts.** Humanist, geometric, serif and monospace are system font stacks: nothing is downloaded, each machine shows the first font of the stack it has (so the look differs a little between Windows, macOS and Linux, and a stack can fall back to the default sans on a machine that has none of its fonts). The *Custom* option takes a `.woff2` file of your own. There is no Google Fonts or any other third-party font service: dashboards often run offline, and the file always comes from the Node-RED that serves the dashboard. **A custom font** needs the file to be served by Node-RED, the same way as a logo: put it in the `httpStatic` folder of `settings.js`, ```js // settings.js httpStatic: '/home/pi/static', // /home/pi/static/fonts/plant.woff2 is served as /fonts/plant.woff2 ``` and set **Font file** to `/fonts/plant.woff2` and **Family name** to the name you want (1 to 60 letters, digits, spaces, `-` or `_`). The path **starts with `/`**: a relative one such as `fonts/plant.woff2` is read against the dashboard path (`/tessera/fonts/…`) and usually gives a 404. A full URL, a `//host` path, a query or any other character is ignored with a warning in the Node-RED log, and the dashboard keeps its own font. Until both fields are valid the dashboard also keeps its own font. **Uploaded images** need no `httpStatic` folder: the builder stores them in `tessera-media/` inside the Node-RED user directory and the dashboard serves them itself, at `//media/` (so they work offline too). PNG, JPEG, WebP, GIF and sanitised SVG only; one setting caps the size of an upload: ```js // settings.js tessera: { mediaMaxSize: 5 * 1024 * 1024 }, // bytes, 5 MB by default ``` **Version history.** On every deploy that changes a dashboard, Node-RED saves a snapshot of it (the dashboard node, its pages and its widgets: configuration only, no wires and no credentials) in `tessera-versions/` inside the user directory, one folder per dashboard. A deploy that changes nothing in it saves nothing. One setting caps how many unnamed versions each dashboard keeps; named versions are never removed and do not count towards the limit: ```js // settings.js tessera: { versionsMax: 50 }, // unnamed versions kept per dashboard, 50 by default ``` **Dashboard only.** These settings change the dashboard, not the builder: while you edit, the palette, the inspector, the toolbar and the settings dialog keep their own look, and only the page shows the new font, density and corners. **The CSS hook still wins.** The settings are `:root` tokens in `brand.css`, written before your [custom CSS](#branding), so a rule of yours overrides them. Authors can also read or set the tokens: | Token | Meaning | |---|---| | `--font-sans` | the dashboard font stack | | `--radius-k` | factor of every corner radius (1 = Normal, `0` = none) | | `--pad-k`, `--gap-k` | factors of paddings and of gaps (1 = Normal) | | `--ctl-k` | factor of the height of buttons and fields (1 = Normal) | ![A dashboard in the dark theme with a serif font, compact spacing and large rounded corners: the tiles sit close together and the labels and values are in a serif face](/tessera/img/theming-style.jpg) *The same dashboard with Serif, Compact and a Large corner radius.* ## Design tokens Everything visual derives from CSS variables. Components never hardcode colors. | Token | Use | |---|---| | `--bg`, `--surface`, `--surface-2`, `--surface-3` | page and tile backgrounds | | `--line`, `--line-strong` | borders | | `--fg`, `--muted`, `--faint` | text | | `--accent`, `--accent-fg`, `--accent-soft` | brand color | | `--ok`, `--warn`, `--alarm` | status | | `--series-1` … `--series-6` | chart series | | `--font-sans`, `--radius-k`, `--pad-k`, `--gap-k`, `--ctl-k` | font, corner radius, spacing and control height (see above) | --- # Stat Source: https://fgjcarlos.github.io/tessera/components/stat A single value with unit, status thresholds and a sparkline. Displays one value prominently with its unit and a sparkline of recent history. Crossing a threshold changes its color and shows a badge. ### With thresholds exceeded ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Value` | Title shown above the value | | `unit` | string | | Unit after the value | | `decimals` | number | `1` | Decimal places for numbers | | `warn` | number | | Value at or above which the stat turns amber | | `alarm` | number | | Value at or above which the stat turns red | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the label | | `sparkline` | boolean | `true` | Show the recent-history line (hidden automatically when narrow) | ## Input ```js msg.payload = 24.3; // number: formatted with decimals, added to the sparkline msg.payload = 'RUNNING'; // text: shown as-is ``` The last 40 numeric values are kept on the server for the sparkline. --- # Text Source: https://fgjcarlos.github.io/tessera/components/text Text or a formatted value — machine states, messages and short notes, with optional Markdown. Shows text or a formatted value: a machine state, an operator message, a batch number, a short note. A **format** template places the value inside a sentence, **color** and **size** make it stand out, and `msg.ui` can change them with the value — for example red when the machine stops. ### With a format template ### Markdown note ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | | Small title above the text (optional) | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the label | | `format` | string | | Template for the value: `{{payload}} °C`, `Batch {{payload.id}}`. Empty shows the payload as is | | `size` | `sm` · `md` · `lg` · `xl` | `md` | Text size | | `align` | `left` · `center` · `right` | `left` | Alignment | | `color` | `neutral` · `accent` · `success` · `warning` · `danger` | `neutral` | Text color, from the theme | | `markdown` | boolean | `false` | Render `**bold**`, `*italic*`, `` `code` ``, `[links](https://…)` and `-` / `1.` lists | ## Input ```js msg.payload = 'RUNNING'; // shown as is msg.payload = 21.5; // with format '{{payload}} °C' → 21.5 °C msg.payload = { id: 'B-2041' }; // with format 'Batch {{payload.id}}' → Batch B-2041 msg.ui = { color: 'danger' }; // change any property, e.g. color by state ``` Objects without a format are shown as JSON. The text keeps line breaks and wraps; if it doesn't fit, the widget scrolls. :::note[Safe by design] HTML in the message is always shown as text, even with Markdown on, and links only accept `http(s)`, `mailto:` and relative URLs. A message can't inject markup or scripts into the dashboard. ::: --- # Status Source: https://fgjcarlos.github.io/tessera/components/status The state of a device — on, off, fault, maintenance — as an LED, a pill or a full tile. Shows the state of a device with color, icon and label. Each incoming value is matched to a **state** you define (value → label, color, icon, blink). Booleans work out of the box: `true`/`false`, `on`/`off`, `1`/`0` and `yes`/`no`. ### LED ### Pill ### Tile ### Default on/off and unknown values ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Status` | Name of the device | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon next to the name (the *tile* style also uses it as the state icon) | | `style` | `led` · `pill` · `tile` | `led` | LED lamp and label, badge on the right, or the whole card in the state color | | `states` | array | on / off | The states, see below | Each state: | Field | Type | Description | |---|---|---| | `value` | string | The value to match, case-insensitive. A number or boolean payload is compared as text | | `label` | string | Text shown (the value when empty) | | `color` | `neutral` · `accent` · `success` · `warning` · `danger` | Theme color; `neutral` reads as *off* | | `icon` | string | Optional Lucide icon for this state | | `blink` | boolean | Blink to catch the eye (steady when the user prefers reduced motion) | Edit the states in the node's dialog or in the builder inspector (*Behaviour → States*). ## Input ```js msg.payload = true; // matches "true" — or "on", "1", "yes" msg.payload = 'fault'; // matches the state named fault msg.payload = 'stuck'; // no match: shown as an unknown state, in neutral with a dashed outline msg.ui = { style: 'tile' }; msg.ui = { states: [{ value: 'open', label: 'Open', color: 'success' }, { value: 'closed', label: 'Closed' }] }; ``` --- # Progress Source: https://fgjcarlos.github.io/tessera/components/progress A horizontal progress bar or a vertical tank level, with warning and alarm limits. Shows a value within a range as a bar: batch progress, fill percentage, tank level. Warning and alarm limits are marked on the bar, which changes color when the value crosses them — like [Stat](../stat/) and [Gauge](../gauge/). ### Value inside the bar, with limits ### Vertical (tank) ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Level` | Title | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the label | | `unit` | string | | Unit after the value | | `min`, `max` | number | `0`, `100` | Range of the bar | | `decimals` | number | `0` | Decimal places | | `warn` | number | | At or above it the bar turns amber; marked on the bar | | `alarm` | number | | At or above it the bar turns red; marked on the bar | | `orientation` | `horizontal` · `vertical` | `horizontal` | A bar, or a tank that fills from the bottom | | `showValue` | boolean | `false` | Horizontal only: show the value inside the bar instead of the header | Size: 3×1 for a bar, 2×3 for a tank. Switching the orientation in the builder inspector or the node dialog resizes a widget that still has the default size. ## Input ```js msg.payload = 68; // drawn within min..max (clamped), shown as received msg.payload = '3200'; // numeric strings work too msg.payload = null; // clears the value (—) msg.ui = { max: 8000 }; // change the range or any other property ``` --- # Gauge Source: https://fgjcarlos.github.io/tessera/components/gauge A 240° radial gauge with warning and alarm zones. A radial gauge for values within a known range. Warning and alarm zones are drawn inside the arc, and the arc changes color when the value enters them. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Gauge` | Title | | `unit` | string | | Unit below the value | | `min` / `max` | number | `0` / `100` | Range of the arc | | `decimals` | number | `1` | Decimal places | | `warn` | number | | Start of the amber zone | | `alarm` | number | | Start of the red zone | Recommended size: **3 × 3**. ## Input ```js msg.payload = 27.5; ``` The payload is a finite number or a numeric string. Anything else (`null`, `""`, `true`, `"abc"`, `Infinity`) clears the value, so the gauge shows no value instead of `0`. Values outside the range are clamped on the arc but displayed as they are. --- # Chart Source: https://fgjcarlos.github.io/tessera/components/chart Real-time line chart with multiple series. A fast real-time line chart built on [uPlot](https://github.com/leeoniya/uPlot). Each `msg.topic` becomes a series. Hover to read values at any point in time. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Chart` | Title | | `unit` | string | | Unit shown in the legend | | `window` | number | `300` | Visible time window, in seconds | | `maxPoints` | number | `2000` | Points kept on the server and in the browser | | `gaps` | boolean | `true` in the editor | Draw a gap where a reading is missing (see [Input](#input)). A chart deployed before the option existed has it off | ## Input ```js // append a point to the "Temperature" series msg.topic = 'Temperature'; msg.payload = 24.3; msg.timestamp = Date.now(); // optional, defaults to arrival time // clear the chart msg.payload = []; ``` A reading is a finite number or a numeric string (`0`, `"12.5"`). Anything else (`null`, `""`, `true`, `"abc"`, `Infinity`) is never a `0`. By default it is ignored: no point is drawn and the line joins the last and the next value. With `gaps` on, it appends a **gap** to that topic's series instead and the line breaks there, so the operator sees the data was lost; a series that already ends in a gap takes no second one, so a dead sensor adds a single point. The legend shows `—` while a series ends in a gap. `gaps` is on for charts you add in the editor; a chart deployed before the option existed keeps it off until you tick *Draw a gap for a missing reading*. The server keeps the history, so the chart is full as soon as a browser opens it. Points are kept in timestamp order (equal timestamps in arrival order), so you can backfill history in any order, one series after the other; when `maxPoints` is exceeded the oldest timestamps are dropped. --- # Bar chart Source: https://fgjcarlos.github.io/tessera/components/bar Compare values by category — units per shift, energy per line, rejects per cause — vertical or horizontal, grouped or stacked. Bars to compare values by category. Each `msg.topic` is a **series**: send one message per line, machine or year, and the bars are grouped side by side or stacked. Colors come from the theme's series palette, so they match the line chart and both themes. Hover a bar for its value; click it (or select it with the keyboard and press Enter) to send it to your flow. ### Grouped ### Stacked, horizontal ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Bar chart` | Title at the top | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `unit` | string | | Shown in tooltips | | `decimals` | number | `0` | Decimals of values and labels | | `orientation` | `vertical` · `horizontal` | `vertical` | Bars going up, or across (long category names) | | `stacked` | boolean | `false` | Stack the series instead of grouping them; totals on top | | `showValues` | boolean | `true` | Values on the bars (when they fit) | | `min`, `max` | number | auto | Widen the value axis; it always includes zero | ## Input ```js msg.topic = 'Line 1'; // the series (one series when empty) msg.payload = { Mon: 420, Tue: 465, Wed: 398 }; // replaces that series msg.payload = [{ label: 'Mon', value: 420 }, …]; // same, as a list msg.payload = [{ label: 'Mon', value: 420, series: 'Line 1' }, { label: 'Mon', value: 380, series: 'Line 2' }]; // several series at once msg.payload = []; // clear (also null) ``` A message replaces only the series it names; categories keep the order they first arrived in. ## Output ```js { payload: { label: 'Tue', series: 'Line 1', value: 465 }, topic: 'units', _client: { id: 'c7f…' } } ``` --- # Pie chart Source: https://fgjcarlos.github.io/tessera/components/pie Parts of a whole — downtime by cause, energy by line, orders by status — as a donut with the total in the middle, or a pie. Slices that add up to a whole, with a legend of values and percentages. As a **donut** (the default) the middle shows the total, or the value of the slice under the pointer. Click a slice (or select it with the keyboard and press Enter) to send it to your flow. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Pie chart` | Title at the top | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `unit` | string | | Shown with the total and in the accessible labels | | `decimals` | number | `0` | Decimals of values | | `donut` | boolean | `true` | A ring with the total in the middle; off for a full pie | | `labels` | `percent` · `value` · `none` | `percent` | Text on the slices (only where it fits) | On a wide tile the legend goes beside the chart; on a tall or narrow one, below it. The legend never shows half a row: it shows as many whole rows as fit and the rest scroll (with the mouse wheel, by touch, or with the arrow keys once the legend has focus) while the chart stays in place. While there are more rows in that direction, a soft fade at the top or bottom edge of the legend says so (it goes away at the end of the list, and there is none when every row fits). ## Input ```js msg.payload = { Changeover: 42, Breakdown: 27, Cleaning: 18 }; // replaces every slice msg.payload = [{ label: 'Changeover', value: 42 }, …]; // same, as a list msg.payload = []; // clear (also null) ``` Zero and negative values are left out. `msg.topic` doesn't matter: a pie has one series. ## Output ```js { payload: { label: 'Breakdown', series: 'value', value: 27 }, topic: '', _client: { id: 'c7f…' } } ``` --- # Table Source: https://fgjcarlos.github.io/tessera/components/table Rows of data — batches, logs, orders, alarms — with sorting, search, badges and row clicks. Shows an array of objects as rows. Columns are automatic (one per property) or configured with a title, a format and an alignment. Click a header to sort, type in the search box to filter, click a row to send it to your flow. Only the rows in view are drawn, so thousands of rows stay fast. The same data ships as an example flow: in Node-RED, *Import → Examples → @fgjcarlos/node-red-tessera → tessera-demo* adds a **Batches** page with this table (20 batches) and a debug node that shows the clicked row. ### Append mode: a live log ### 1,000 rows Only the rows in view are in the page; scrolling, sorting and searching stay instant. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Table` | Title, with the row count | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the label | | `columns` | array | automatic | `{ key, title, format, align, width, decimals }` — see below | | `mode` | `replace` · `append` | `replace` | Whether new rows replace the table or are added to it | | `maxRows` | number | `500` | Rows kept on the server; the oldest are dropped | | `search` | boolean | `true` | Show the search box | | `clickable` | boolean | `true` | Send the row when clicked (or Enter on a focused row) | | `emptyText` | string | `No rows yet` | Shown when there are no rows | Columns: | Field | Description | |---|---| | `key` | Row property; `motor.temp` reads nested values | | `title` | Header (defaults to the key, e.g. `batchId` → *Batch id*) | | `format` | `text` · `number` (thousands separator, `decimals`) · `date` (timestamps or ISO strings) · `badge` (green for ok/running/done, amber for warning/idle/hold, red for error/fault/stopped) | | `align` | `left` · `center` · `right` (numbers default to right) | | `width` | Pixels; empty shares the remaining space | Without configured columns, the table shows one per property of the rows (properties starting with `_` are hidden), numbers right-aligned and `status`/`state` as badges. The builder inspector suggests the keys of the current rows as columns. ## Input ```js msg.payload = [{ batch: 'B-2041', units: 1200, status: 'running' }, …]; // replace mode: the new table msg.payload = { time: Date.now(), message: 'Started' }; // append mode: one more row msg.payload = []; // clear, in any mode msg.ui = { mode: 'append' }; // switch mode msg.ui = { columns: [{ key: 'batch' }, { key: 'units', format: 'number' }] }; ``` In append mode only the new rows travel to the browsers, not the whole table. ## Output ```js { payload: { batch: 'B-2040', units: 1115, status: 'done', … }, topic: 'batch', _client: { id: 'c7f…' } } ``` The row is identified on the server, so the message always carries the row the user clicked, whatever the browser sorted or filtered — and a browser can't make the node send a row it doesn't have. --- # Alarm list Source: https://fgjcarlos.github.io/tessera/components/alarms The active alarms of a machine or a line — severities, counters, acknowledge, history — following the usual HMI life cycle. The alarms that are active right now, the most urgent first, with a counter per severity. Operators **acknowledge** them one by one or all at once; every acknowledgement goes to your flow. Cleared alarms move to the **History** tab. Try **Ack** on the cleared valve alarm, then open **History**: ## How alarms move 1. **Raised**: a message with an `id` adds it. Unacknowledged alarms are listed first and tinted; **critical** ones blink until someone acknowledges them. 2. **Acknowledged**: someone pressed **Ack** (or your flow sent `ack: true`). The alarm stays in the list while it is still active. 3. **Cleared**: your flow sends `active: false` when the condition is gone. If it was already acknowledged, it moves to the history. If not, it stays in the list marked **Cleared** until someone acknowledges it, so nobody misses an alarm that came and went. Raising a cleared alarm again (same `id`) starts a new occurrence. This is the usual life cycle of industrial alarm systems (ISA-18.2), kept simple. | Severity | Use it for | |---|---| | `critical` | Stops production or is a safety risk: act now | | `major` (default) | Needs action soon | | `minor` | Needs attention, not urgent | | `info` | Worth knowing: maintenance due, a recipe changed | ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Alarms` | Title at the top | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `sort` | `severity` · `time` | `severity` | Order of the list (people can switch it); unacknowledged alarms always come first | | `maxHistory` | number | `50` | Cleared alarms kept in the History tab; `0` hides the tab | | `ackable` | boolean | `true` | Show **Ack** and **Ack all**; off for a read-only list | | `blink` | boolean | `true` | Blink unacknowledged critical alarms (never with *reduce motion*) | | `emptyText` | string | `No active alarms` | Shown when nothing is active | ## Input ```js // raise (or update the text and severity of an active alarm) msg.payload = { id: 'P-101', severity: 'critical', text: 'Pump P-101 overload trip' }; msg.payload = { id: 'T-3', text: 'Tank T-3 high level', time: '2026-11-29T14:03:00Z' }; // time: default now msg.payload = { id: 'P-101', active: false }; // cleared msg.payload = { id: 'P-101', ack: true }; // acknowledged from the flow (no output) msg.payload = [ { id: 'A', … }, { id: 'B', active: false } ]; // several at once msg.reset = true; // empty the list and the history ``` A function node can turn PLC bits into alarms: send `{ id, text, severity }` when a bit rises and `{ id, active: false }` when it falls. ## Output One message per alarm someone acknowledges in the dashboard (**Ack all** sends one per alarm): ```js { payload: { id: 'P-101', severity: 'critical', text: 'Pump P-101 overload trip', time: 1764424980000, ack: true, ackTime: 1764425100000, cleared: false, clearTime: null }, topic: 'alarms', _client: { id: 'c7f…' } } ``` The list (active and history) is kept on the server: every browser sees the same alarms and acknowledgements, and a page opened later shows them too. --- # Button Source: https://fgjcarlos.github.io/tessera/components/button Buttons in four styles, five colors and four sizes, with icons, loading state and inline confirmation. Sends a configured payload when pressed. Buttons keep a natural height inside their grid cell; use `xl` for touch panels. ## Variants and colors Four styles (`variant`) × five colors (`color`). Every combination works in dark and light themes. ## Sizes | Size | Height | Use | |---|---|---| | `sm` | 32 px | dense toolbars | | `md` | 40 px | default | | `lg` | 48 px | primary actions | | `xl` | 56 px | touch panels, gloves | ## Icons Any of the ~2,400 [Lucide icons](https://lucide.dev/icons) by name: `play`, `power`, `rotate-ccw`, `thermometer`… Put one before or after the label, or leave the label empty for an icon-only button. Icons load on demand, so they add nothing to the bundle. ## Confirmation Set `confirm` to a question and the button asks inline before sending, with no browser pop-ups. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Button` | Text. Empty + an icon = icon-only button | | `variant` | `solid` \| `soft` \| `outline` \| `ghost` | `solid` | Visual style | | `color` | `accent` \| `neutral` \| `success` \| `warning` \| `danger` | `accent` | Color | | `size` | `sm` \| `md` \| `lg` \| `xl` | `md` | Height and text size | | `icon` | string | | Lucide icon before the label | | `iconRight` | string | | Lucide icon after the label | | `fullWidth` | boolean | `true` | Fill the cell width | | `payload` | any | `clicked` | Payload sent on press (string, number, boolean, JSON, timestamp) | | `topic` | string | | `msg.topic` of the output | | `confirm` | string | | Ask this question before sending | | `loading` | boolean | `false` | Spinner, ignores presses. Set via `msg.ui` | | `disabled` | boolean | `false` | Set via `msg.ui` | ## Output ```json { "payload": "start", "topic": "cmd", "_client": { "id": "c3-lq0z1" } } ``` ## Example: show progress while a job runs ```js // before starting the job return { ui: { loading: true, label: 'Running…' } }; // when it finishes return { ui: { loading: false, label: 'Start cycle' } }; ``` --- # Switch Source: https://fgjcarlos.github.io/tessera/components/switch An on/off toggle that stays in sync across browsers. A toggle for boolean state. The whole tile is clickable. When one user flips it, every other open browser updates. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Switch` | Title | | `description` | string | | Secondary line. Shows On/Off when empty | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon in a chip that lights up when on | | `topic` | string | | `msg.topic` of the output | | `passthru` | boolean | `false` | Forward input messages to the output | ## Input ```js msg.payload = true; // also accepts 1, "on", "true" ``` Setting the state from a flow does **not** emit an output unless `passthru` is enabled, which avoids feedback loops. ## Output ```json { "payload": true, "topic": "pump", "_client": { "id": "c3-lq0z1" } } ``` --- # Slider Source: https://fgjcarlos.github.io/tessera/components/slider A numeric slider that sends its value on release. Selects a number in a range. The value is shown live while dragging and **sent once on release**, so your flow isn't flooded. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Slider` | Title | | `min` / `max` | number | `0` / `100` | Range | | `step` | number | `1` | Increment, which also sets the displayed decimals | | `unit` | string | | Unit after the value | | `topic` | string | | `msg.topic` of the output | | `passthru` | boolean | `false` | Forward input messages to the output | ## Input ```js msg.payload = 22.5; ``` The payload is a finite number or a numeric string. Anything else (`null`, `""`, `true`, `"abc"`, `Infinity`) is ignored: the value stays and nothing is passed through, never a `0`. ## Output ```json { "payload": 22.5, "topic": "setpoint", "_client": { "id": "c3-lq0z1" } } ``` --- # Dropdown Source: https://fgjcarlos.github.io/tessera/components/dropdown Pick one value from a list — mode, recipe, equipment — with search for long lists. Lets the operator pick one value from a list. Options are set in the editor (label and a typed value) or sent at runtime in `msg.options`. Long lists get a search box, and the whole list works with the keyboard. ### Long list with search and numeric values ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Select` | Title above the list | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the label | | `placeholder` | string | `Select…` | Shown when nothing is selected | | `options` | array | | `{ label, value }` items; in the editor each value has a type: text, number or boolean | | `disabled` | boolean | `false` | Set with `msg.ui` to lock the selection | Lists with more than 8 options show a search box (matches labels and values, all words). ## Input ```js msg.payload = 'manual'; // select by value (no output unless "Pass input messages through") msg.payload = null; // clear the selection msg.options = ['Line 1', 'Line 2']; // replace the options: strings… msg.options = [{ label: 'Recipe A', value: 101 }, { label: 'Recipe B', value: 102 }]; // …or label/value msg.ui = { disabled: true }; // lock while a batch runs ``` `msg.options` with `msg._client` changes the list only for that browser and isn't stored. ## Output When the user picks an option: ```js { payload: 101, topic: 'recipe', _client: { id: 'c7f…' } } // the value keeps its type ``` Only values in the list are ever sent, whatever a browser asks for. --- # Input Source: https://fgjcarlos.github.io/tessera/components/input Type a text or a number — an exact setpoint, a name, a code — with validation and an inline error. A field to type a value. **Number** mode has −/+ buttons, arrow keys, a unit, limits and accepts a decimal comma; **text** mode can require a format; **password** mode hides what is typed. Values are checked as you type and again on the server: an invalid value shows an inline error and is never sent. ### Number with limits Type a value and press Enter, or use −/+. Try `95` or `21,5`. ### Text with a pattern ### Password ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Input` | Title above the field | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the label | | `mode` | `text` · `number` · `password` | `text` | Kind of value | | `placeholder` | string | | Hint shown when empty | | `unit` | string | | Number mode: unit inside the field | | `min`, `max` | number | | Number mode: limits (empty = none) | | `step` | number | `1` | Number mode: −/+ and arrow-key increment | | `required` | boolean | `false` | Empty values are an error | | `pattern` | string | | Text and password: a regular expression the **whole** value must match | | `patternMessage` | string | `Invalid format` | Error shown when the pattern doesn't match | | `sendOn` | `enter` · `change` | `enter` | Send on Enter or leaving the field, or while typing (after a 0.5 s pause) | | `disabled` | boolean | `false` | Set with `msg.ui` to lock the field | Press **Escape** to discard what you typed and go back to the current value. ## Input ```js msg.payload = 65; // set the value shown (no output unless "Pass input messages through") msg.ui = { max: 80 }; // change limits or any other property msg.ui = { disabled: true }; ``` ## Output ```js { payload: 21.5, topic: 'setpoint', _client: { id: 'c7f…' } } // number mode: a number (null when cleared) { payload: 'AB-1234', topic: 'batch', _client: { id: 'c7f…' } } // text and password: a string ``` :::note[Passwords] In password mode the value goes to the flow only: it isn't stored, shown to other browsers or replayed when a page opens, and `msg.payload` sent to the node doesn't fill the field. ::: --- # Date / time Source: https://fgjcarlos.github.io/tessera/components/datetime Pick a date, a time, both, or a date range — a report period, a batch start, a shift — with limits, in the user's own format. A field to pick a **date**, a **time**, **both**, or a **date range**. It uses the browser's own pickers, so dates show in each person's format (1/12/2026, 12/1/2026…) and phones open their native calendar. The value is sent as soon as it is complete; limits grey out the days you can't pick, and the server checks them again. ### Date ### Time ### Date and time ### Range ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Date` | Title above the field | | `icon` | string | per mode | [Lucide](https://lucide.dev/icons) icon; defaults to a calendar, a clock or a calendar range | | `mode` | `date` · `time` · `datetime` · `range` | `date` | What to pick | | `min`, `max` | string | | Limits: `YYYY-MM-DD` (whole days, also for date and time) or `HH:MM` for a time | | `required` | boolean | `false` | Can't be emptied (no clear button) | | `disabled` | boolean | `false` | Set with `msg.ui` to lock the field | A range is sent once both dates are set, and the end can't be before the start. ## Input ```js msg.payload = '2026-12-01'; // date msg.payload = '14:30'; // time msg.payload = '2026-12-01T13:30:00Z'; // an ISO date, or a timestamp: Date.now() msg.payload = { from: '2026-12-01', to: '2026-12-07' }; // range (or ['2026-12-01', '2026-12-07']) msg.payload = null; // clear ``` Setting the value doesn't produce an output, unless **Pass input messages through** is on. ## Output | Mode | `msg.payload` | `msg.timestamp` | |---|---|---| | `date` | `'2026-12-01'` | local midnight, in ms | | `time` | `'14:30'` | — | | `datetime` | `'2026-12-01T13:30:00.000Z'` (ISO, UTC) | the same instant, in ms | | `range` | `{ from: '2026-12-01', to: '2026-12-07' }` | `{ from, to }`: start of the first day, end of the last, in ms | Clearing the field sends `null`. :::note[Time zones] Timestamps use the time zone of the browser that picked the value: a date picked in Madrid is midnight in Madrid. Dates and times as text (`'2026-12-01'`, `'14:30'`) are exactly what the person picked. Date-and-time values are stored as ISO, so every browser shows them in its own local time. ::: --- # Form Source: https://fgjcarlos.github.io/tessera/components/form Several fields sent together as one message — a recipe and batch size, a shift report, settings — with validation and inline errors. Several fields that go together, sent as **one** message when someone presses **Submit**: `msg.payload = { recipe: 'R2', size: 800, … }`. Fields can be text, number, select, toggle or date, with a label, a default and **required**; numbers can have a range. Values are checked before sending, with the error under each field, and again on the server: an invalid form is never sent. Try **Start batch** with the size empty, or `9000`: What someone types stays in **their** browser until they submit: other people looking at the dashboard don't see it. **Cancel** goes back to the last values the flow sent. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Form` | Title at the top | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `fields` | array | | The fields, in order (below) | | `submitLabel` | string | `Submit` | Text of the submit button | | `cancelLabel` | string | `Cancel` | Text of the cancel button; empty hides it | | `resetOnSubmit` | boolean | `false` | Clear the fields (back to their defaults) after sending | | `disabled` | boolean | `false` | Set with `msg.ui` to lock the form | Each field: | Key | Type | Description | |---|---|---| | `key` | string | Property name in `msg.payload` (required, unique) | | `label` | string | Label above the field (defaults to the key) | | `type` | `text` · `number` · `select` · `toggle` · `date` | Kind of field | | `required` | boolean | Empty is an error (not for toggles) | | `value` | | Default value: a number, text, an option's value, `true`/`false` or `YYYY-MM-DD` | | `options` | array or string | Select: `['R1', 'R2']`, `[{ label: 'Low', value: 1, type: 'num' }]` or `"R1, R2"` | | `min`, `max` | number | Number: limits | | `placeholder` | string | Hint shown when empty | The form fills its tile and scrolls if the fields don't fit; on wide tiles the fields flow into columns. **Enter** in a text or number field submits. ## Input ```js msg.payload = { recipe: 'R2', size: 800 }; // pre-fill these fields (others keep their value) msg.payload = null; // back to every field's default msg.ui = { fields: [ … ] }; // replace the fields msg.ui = { disabled: true }; ``` A pre-fill is stored and shown to every browser that opens the page, like other widgets' values. No output unless **Pass input messages through** is on. ## Output ```js { payload: { recipe: 'R2 · Low salt', size: 800, operator: 'Ana', date: '2026-12-01', rinse: true }, topic: 'batch', _client: { id: 'c7f…' } } ``` Every field is in `payload`, typed: numbers (or `null` when empty), strings, the option's value with its type, `true`/`false`, and dates as `"YYYY-MM-DD"` (or `null`). --- # Image Source: https://fgjcarlos.github.io/tessera/components/image A picture from a URL or from the flow — a plant diagram, a camera snapshot, a chart rendered elsewhere — optionally reloaded every few seconds. A picture that fills its tile. Point it at a URL (reloaded every few seconds if you want, e.g. a camera snapshot) or send the image from the flow: a Buffer from *http request* or *file in*, a base64 string or a `data:image` URI. Without a label it goes edge to edge. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | | Optional title; without it the image fills the whole tile | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `src` (node config) | string | | Image URL: `https://…`, a path served by Node-RED (`/images/plan.png`) or an image from the [media library](/tessera/guides/media-library/) | | `fit` | `contain` · `cover` | `contain` | Show the whole image, or fill the tile (cropping) | | `refresh` | number | `0` | Reload a URL every N seconds; the old image stays until the new one has loaded | | `alt` | string | | Description for screen readers | ## Input ```js msg.payload = 'http://10.0.0.20/snapshot.jpg'; // a URL msg.payload = buffer; // a Buffer: PNG, JPEG, GIF, WebP, BMP or SVG msg.payload = base64String; // the same, as base64 msg.mimetype = 'image/x-icon'; // when the type can't be recognised msg.payload = null; // clear ``` Images from the flow are kept (up to 5 MB) and shown to browsers that open the page later. Only `http(s)` and relative URLs are accepted: `javascript:` or other schemes are ignored with a warning. ## Picking a picture In the builder, the source is an image field: the text box takes any URL and the button next to it opens the [media library](/tessera/guides/media-library/), where images are uploaded once and picked from a grid. A picked image is stored as `media/`, relative to the dashboard path, so the same value works on any page and after a rename of the dashboard. --- # Camera Source: https://fgjcarlos.github.io/tessera/components/camera A live camera in the dashboard — MJPEG, HLS or a video stream — that reconnects by itself when the signal drops. A live stream from an IP camera or a video server. Most IP cameras offer **MJPEG** (`…/video.mjpg`, `…/mjpg/video.cgi`), which plays everywhere; **HLS** (`….m3u8`) and plain **video** (MP4, WebM) work too. *Auto* picks the player from the URL. The browser connects to the camera **directly**: the camera must be reachable from the browsers that show the dashboard, and HLS servers must allow it (CORS). - **Reconnects by itself.** When the stream drops, the widget shows *No signal · retrying in N s* and tries again after 2, 4, 8, 16 and then every 30 seconds. - **Pauses while the tab is hidden**, so a dashboard left open in the background doesn't keep pulling video over a slow plant network. - An **on/off button** (power icon) in the title bar, next to the badge (the bar shows even without a title), stops the stream in that browser to save bandwidth or for privacy: the image or video is released, so nothing is requested from the camera, and the tile shows *Camera off*. Switching it on connects again. The choice is local: a reload connects again. Hide the button with the *On/off button* option. - A **Live** / **Offline** badge in the title bar shows the state at a glance. - HLS plays natively in Safari and on phones. Other browsers download a player (hls.js, about 115 KB) the first time a page with an HLS camera opens: never for MJPEG or video, and never for dashboards without cameras. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Camera` | Title; empty for edge-to-edge video | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `src` (node config) | string | | Stream URL | | `kind` | `auto` · `mjpeg` · `hls` · `video` | `auto` | Player; *auto*: `.m3u8` is HLS, video files are video, anything else MJPEG | | `fit` | `contain` · `cover` | `contain` | Show the whole frame, or fill the tile (cropping) | | `showPower` | boolean | `true` | Show the on/off button in the tile | | `live` (`msg.ui` only) | boolean | `true` | `false` switches the camera off in every browser, `true` on again (see below) | ## Input ```js msg.payload = 'http://10.0.0.21/mjpg/video.mjpg'; // switch to another camera msg.payload = null; // stop ``` ```js msg.ui = { live: false }; // switch the camera off in every browser msg.ui = { live: true }; // and on again ``` A browser's own button choice lasts until the flow changes `live`; browsers that open the page later get the flow's value. Only `http(s)` and relative URLs are accepted. RTSP streams don't play in browsers: use the camera's MJPEG or HLS output, or a converter such as go2rtc or MediaMTX. --- # Embed Source: https://fgjcarlos.github.io/tessera/components/embed Another web page inside the dashboard — a Grafana panel, a report, a machine's web interface — in a sandbox. Another web page in a tile: a Grafana panel, a report, the web interface of a machine. It runs in a **sandbox** (an `iframe` with limited permissions): by default it can run scripts and submit forms, but it can't open pop-ups or act as its own site (cookies, logins). ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | | Optional title; without it the page fills the whole tile | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `src` (node config) | string | | Page URL: `https://…` or a path (`/grafana/d/…`) | | `allowScripts` | boolean | `true` | Let the page run JavaScript | | `allowForms` | boolean | `true` | Let the page submit forms | | `allowPopups` | boolean | `false` | Let the page open pop-ups and new tabs | | `allowSameOrigin` | boolean | `false` | Let the page keep its origin: cookies, logins, storage | ## Theme The tile tells the page which theme the dashboard is using, so an embedded page can match it. On load and every time the theme changes, the widget posts a message to the frame (the page is not reloaded): ```js // in the embedded page addEventListener('message', (e) => { if (e.data?.tessera === 'theme') document.documentElement.dataset.theme = e.data.theme; // 'dark' | 'light' }); ``` Check `e.source === parent` if you want to ignore other senders. Pages that don't listen simply ignore it; the message carries nothing but `dark` or `light`. The example flow's report page (*Media & forms*) does exactly this. ## Input ```js msg.payload = 'https://grafana.plant.local/d-solo/abc?panelId=2'; // show this page msg.payload = null; // clear ``` :::caution - Some sites refuse to be embedded (`X-Frame-Options` or `frame-ancestors`): the tile then stays blank. That is the site's choice; open it in a new tab instead. - Don't turn on both **scripts** and **same origin** for pages served by this Node-RED: together they let the page leave the sandbox and act as the dashboard. ::: --- # Template Source: https://fgjcarlos.github.io/tessera/components/template Your own component in HTML, CSS and JavaScript, or as a Svelte component, with the dashboard's theme and the same message contract as every widget. For anything the built-in widgets don't cover: a tank drawing, a machine diagram, a custom control. You write **HTML** with optional **` `; The template above is the whole widget. Press **Drain** to see the message it sends. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | | Optional title; without it the template fills the whole tile | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `format` | `html` \| `svelte` | `html` | How the template is written | | `frame` | boolean | `true` | The tile's background, border and padding. Turn it off when the template draws its own card, so it doesn't look like a card inside a card | | `template` | string | a small example | The HTML (with optional ``; - Styles are scoped by Svelte and stay inside the tile; the theme tokens work as in HTML templates. - Templates can import from Svelte itself: `svelte`, `svelte/transition`, `svelte/easing`, `svelte/animate`, `svelte/motion`, `svelte/store`, `svelte/reactivity`, `svelte/events` and `svelte/attachments`. Nothing else: no npm packages, no URLs (dashboards often run offline). - Compile errors show in the tile with the line; so do errors while rendering. :::note[Size] Svelte templates are compiled in the browser. A page with one downloads the Svelte compiler and runtime once, about 260 KB gzipped, and caches them. Pages without Svelte templates don't download them, and neither do HTML templates. ::: ## Input ```js msg.payload = 72; // any value: stored and passed to on('message') msg.payload = { level: 72, pump: 'run' }; msg.ui = { label: 'Tank 4' }; // props, as with every widget msg.ui = { template: 'New content' }; // even the template ``` The last message is stored, so a browser that opens the dashboard later gets it too. With `msg._client`, it goes to one browser only and isn't stored. ## Output What the script passes to `send()`: ```js { payload: 'drain', topic: 'tank3', _client: { id: 'c1-…' } } ``` :::caution The script runs in the browsers that open the dashboard, with the dashboard's privileges, the same way a *function* node runs with Node-RED's. Only flow authors should write templates, and don't build a template from text that comes from outside (`msg.ui.template` from an HTTP request, for example). ::: --- # Equipment Source: https://fgjcarlos.github.io/tessera/components/equipment One card per piece of equipment — a tank, pump, motor, valve, compressor, heat exchanger, conveyor, agitator, silo, blower or your own signals; a culture tank and a feeder for aquaculture — with a library symbol, one tag per signal, limits, trends and a faceplate with Start and Stop. One card for one piece of equipment: a **library symbol** that follows the state (a level fills it, a running signal turns the rotor), the main reading with its limits drawn on a bar, a few secondary signals and a short trend. Click the card to open its **faceplate**: every signal with its limits and a larger trend, the active alarms and, when the equipment has a command signal, **Start** and **Stop**. Like the [Synoptic](/tessera/components/synoptic/), it gets its data **only from the [tag table](/tessera/guides/tags/)** (a `msg.payload` on its input is ignored) and lives in the `tessera-hmi` node set. Equipment is **generic**: a *template* (`kind`) only fills in a symbol and a table of signals, and you can edit both. The templates are industry-neutral (a tank, a pump, a compressor, a heat exchanger, a conveyor…), with two **aquaculture** extras kept apart (a culture tank and a feeder). In the template lists of the builder and the Node-RED dialog the general ones come first, then the *Aquaculture* group. Add a card in the [builder](/tessera/builder/) (the *HMI* category) or the Node-RED dialog, pick a template and give it a tag prefix, or a tag per signal. ### Tank: level, temperature and pressure The generic `tank` has `Level` (the main reading), `Temp` and `Pressure`. A level over 95 % (`hihi`) is a priority 2 alarm, over 90 % (`hi`) priority 3; what is abnormal keeps the alarm colors in both themes. ### Pump and compressor with Start and Stop The pump has a `Run` signal with the `command` role, so its faceplate offers **Start** and **Stop** (each asks for confirmation; the demo sends nothing). Every rotating machine (pump, motor, compressor, conveyor, agitator, blower) has it. ### Heat exchanger, conveyor and silo ### A tripped pump A `Fault` signal that is true is a priority 1 alarm. ### Aquaculture: culture tank and feeder The `culture-tank` template is the fish culture tank, with dissolved oxygen as the main reading. Oxygen at 5.8 mg/L is under its `lolo` limit (6 mg/L): priority 2. Between 6 and 6.5 (`lo`) it would be priority 3. ### Your own signals, one tag each `signals` replaces the template's table, `symbol` picks the drawing and every signal names its own tag, so nothing has to follow a naming scheme: ### Themes: Tessera and ISA-101 `theme: 'isa101'` is grey when everything is normal and uses color only for what needs attention, like the synoptic's `isa101` canvas. The default, `classic` (labelled **Tessera** in the builder and the dialog, the Tessera look of the synoptic), also colors the state and one ink per quantity, using only Tessera's tokens, so it follows the dashboard's theme and accent. ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | | Title of the card (empty: the last part of the prefix, else the template's name) | | `kind` | string | `tank` | The template: `tank`, `pump`, `motor`, `valve`, `compressor`, `heat-exchanger`, `conveyor`, `agitator`, `silo`, `blower` or `custom`, and the aquaculture extras `culture-tank` and `feeder`. An unknown one is the generic `tank` | | `symbol` | string | the template's | A symbol of the synoptic library's *equipment* category: `tank`, `silo`, `pump`, `motor`, `fan`, `valve`, `valve-onoff`, `valve-manual`, `compressor`, `heat-exchanger`, `conveyor`, `cylinder`. Empty follows the template | | `prefix` | string | | Tag prefix, e.g. `RAS1/T101`: fills the tag of every signal that has none (see below) | | `tags` | object | `{}` | One tag per signal: `{ "Temp": "PLC1/temp_t101" }`. Unknown signal names are ignored | | `signals` | array | none | The node's own signal table (up to 16), replacing the template's. See below. Edited in the Node-RED dialog | | `limits` | object | `{}` | Per-signal overrides of a **template's** limits: `{ "Level": { "lo": 25, "hi": null, "band": [40, 80] } }`. A number sets, `null` switches a limit off, `min` and `max` need numbers. Ignored when the node has its own `signals` | | `theme` | string | `classic` | `classic` (the Tessera look) or `isa101`. Nodes saved before the option are `classic` | | `topic` | string | | Sent as `msg.topic` by the commands (default: the command signal's tag) | There is no single `tag` property. Size: 3×2 by default. `msg.ui` changes any property. ### Tag resolution Each signal follows **one tag**, found in this order: 1. its **explicit tag** in `tags` (`tags.Temp = "PLC1/temp_t101"`); 2. else **`/`** (prefix `RAS1/T101` and signal `Temp` give `RAS1/T101/Temp`); 3. else it is **not bound**: the card shows `—` for it, and a node with neither prefix nor tags turns its status red (*no tags*). So a node saved with only a prefix works as it always did, and you can mix: give the prefix and override the one signal whose tag does not fit. A tag with *bad* quality shows `—` and never raises an alarm, a *stale* one keeps its last value, dimmed, and is still judged against the limits; each signal is judged on its own. ## Templates and their signals A signal is a number (with a unit, scale and limits) or an on/off value. *Main* is the big reading; the card also shows the signals in *Row*. General templates first: | `kind` | Symbol | Signals (key: what, unit) | Main | Row | Commands | |---|---|---|---|---|---| | `tank` | `tank` | `Level` (%), `Temp` (°C), `Pressure` (bar) | `Level` | `Temp`, `Pressure` | none | | `pump` | `pump` | `Run`, `Fault`, `Speed` (%), `Current` (A) | `Speed` | `Current`, `Fault` | `Run` | | `motor` | `motor` | `Run`, `Fault`, `Speed` (%), `Current` (A) | `Speed` | `Current`, `Fault` | `Run` | | `valve` | `valve-onoff` | `Open`, `Fault`, `Position` (%) | `Position` | `Open`, `Fault` | none | | `compressor` | `compressor` | `Run`, `Fault`, `Pressure` (bar, discharge), `Temp` (°C), `Current` (A) | `Pressure` | `Temp`, `Current`, `Fault` | `Run` | | `heat-exchanger` | `heat-exchanger` | `TempIn` (°C), `TempOut` (°C), `Flow` (m³/h) | `TempOut` | `TempIn`, `Flow` | none | | `conveyor` | `conveyor` | `Run`, `Fault`, `Speed` (m/s) | `Speed` | `Fault` | `Run` | | `agitator` | `motor` (the library has no mixer) | `Run`, `Fault`, `Speed` (rpm), `Current` (A) | `Speed` | `Current`, `Fault` | `Run` | | `silo` | `silo` | `Level` (%), `Weight` (t), `LowLevel` | `Level` | `Weight`, `LowLevel` | none | | `blower` | `fan` | `Run`, `Fault`, `Speed` (%), `Pressure` (mbar), `Current` (A) | `Pressure` | `Speed`, `Current`, `Fault` | `Run` | | `custom` | `tank` | `Value` | `Value` | none | none | Aquaculture extras, kept as separate templates: | `kind` | Symbol | Signals (key: what, unit) | Main | Row | Commands | |---|---|---|---|---|---| | `culture-tank` | `tank` | `O2` dissolved oxygen (mg/L), `Temp` (°C), `Level` (%), `Feed` feeder on/off | `O2` | `Temp`, `Level`, `Feed` | none | | `feeder` | `conveyor` | `Run`, `Fault`, `Rate` (kg/h), `Total` (kg) | `Rate` | `Total`, `Fault` | `Run` | `Run`, `Open`, `Feed` and `LowLevel` are on/off; `Fault` and `LowLevel` are faults (a true value is a priority 1 alarm). The templates carry sensible scales and limits (for example the tank's `Pressure` has `hi` 7 and `hihi` 8.5 bar, and the culture tank's `O2` has `lolo` 6, `lo` 6.5 and a normal band of 7.5–10 mg/L). The `limits` property overrides them signal by signal. The table is one source (`ui/src/lib/equipment-kinds.js`) for the runtime, the dialog and the card. `tank` is the generic tank; the fish tank with oxygen is `culture-tank`. A node with its own `signals` does not use the template's table at all. ### Your own signals `signals` is a list of up to 16 objects. Invalid ones are dropped one by one and logged on the node. | Field | Description | |---|---| | `key` | The signal's name: the last part of `/` and the key in `tags` | | `label`, `unit` | Shown next to the value | | `type` | `number` (default) or `bool` | | `min`, `max`, `dec` | Scale of the bar (default 0–100) and decimals | | `lolo`, `lo`, `hi`, `hihi` | Limits: `lo` and `hi` are priority 3, `lolo` and `hihi` priority 2 | | `band` | `[from, to]`, the normal range drawn behind the bar | | `texts` | `[off, on]` text of an on/off signal | | `fault` | On/off only: a true value is a priority 1 alarm | | `role` | `main` (the big reading; default: the first number) or `command` (on/off only: Start and Stop act on it) | ## Commands Only equipment with a signal whose `role` is `command` (`Run` in a pump, motor, compressor, conveyor, agitator, blower or feeder) has them. The faceplate shows **Start** and **Stop**; each asks for confirmation. The browser sends only the action: the runtime takes the tag from its own config. Confirmation is convenience, not security (Tessera has no users yet). Nothing is written to a device: wire the output to the driver node you trust. A tank, a heat exchanger, a silo and a valve have no command, and a command the runtime does not accept (no command signal, an action other than `start` or `stop`) emits nothing and logs a warning on the node. ## Input ```js msg.payload = 42; // ignored: values come from the tags msg.ui = { label: 'T101 north', theme: 'isa101' }; // change a property ``` The values come from a [`tessera-tags`](/tessera/guides/tags/) node named `RAS1`: `{ "T101/Level": 74, "T101/Temp": 38.5 }` on its input sets `RAS1/T101/Level` and `RAS1/T101/Temp`. The example `examples/equipment-demo.json` has a simulated plant (tanks, a pump, a valve, a compressor, a heat exchanger, a conveyor, an agitator and a silo, with Start and Stop) and one aquaculture culture tank with its feeder. ## Output Pressing Start or Stop and confirming emits one message, with the browser that sent it in `_client`: ```js { payload: { item: 'RAS1/P101', action: 'start', value: true }, // stop: action 'stop', value false topic: 'RAS1/P101/Run', // the node's topic, else the command signal's tag _client: { id: 'c8f2…' } } ``` `item` is the prefix (the command tag when the node has none). The trends are kept in the browser for the last five minutes and are lost on reload (no history on the server). --- # Notification Source: https://fgjcarlos.github.io/tessera/components/notification Toasts and confirmation dialogs for operators — on every page, for every browser or just one. Pop-up messages for operators: a **toast** that closes itself, or a **dialog** that asks to confirm and sends the answer to your flow. A notification node has no page and no place on the grid: what it shows appears on top of whichever page each browser has open. Try them: toasts stack per corner and pause while the pointer is over them; the error one stays until closed. ## Properties Set in the node, and overridable per message with `msg.ui`: | Property | `msg.ui` key | Default | Description | |---|---|---|---| | Show as | `kind` | `toast` | `toast` or `dialog` | | Type | `type` (or `level`) | `info` | `info` · `success` · `warning` · `error`: color and icon | | Title | `title` | | Bold first line (optional) | | Position | `position` | `top-right` | Toasts: `top-right` · `top-center` · `top-left` · `bottom-right` · `bottom-center` · `bottom-left` | | Close after | `timeout` | `5` | Toasts: seconds; `0` stays until closed | | OK button | `okLabel` | `OK` | Dialogs | | Cancel button | `cancelLabel` | `Cancel` | Dialogs; empty for an OK-only dialog | ## Input ```js msg.payload = 'Recipe saved'; // the text msg.ui = { type: 'error', title: 'Pump P-101 tripped', timeout: 0 }; msg._client = { id: '…' }; // only that browser (e.g. the operator who pressed a button) msg.dismiss = true; // close everything this node is showing ``` Notifications are not stored: a browser that opens later doesn't see earlier ones. ## Output (dialogs) ```js { payload: 'ok', topic: 'confirm', _client: { id: 'c7f…' }, batch: 'B-7' } // or 'cancel' ``` The rest of the input message is kept, so you can tell which question was answered. When a dialog goes to every browser, **the first answer wins**: the dialog closes in the other browsers and only one message is sent. ## In the builder Notification is in the palette under **Feedback**. Click it to add one; it appears in the **Feedback on this dashboard** list instead of on the page. Select it there to edit it in the inspector, or press the eye icon to preview it. On *Apply* it goes to a *Feedback* group in the **Tessera UI** flow. --- # Section Source: https://fgjcarlos.github.io/tessera/components/section A titled frame that groups widgets on the grid, with an optional background and border. A section is a **frame on the grid**: a rectangle with a title on its top border, a background and a border. It does not contain widgets; it shares cells with the ones it frames and is painted **under** them. Place the section over the cells you want to group and the widgets inside it look like one block. It has no value and no output: it only draws. The title sits on the border like the legend of a form group and takes no cells: the widgets can use the whole frame. A section only works in the grid regions of a page (Main, Top band, Second column), not in stack regions such as the sidebar. :::note[Which widgets belong to it] A widget is inside a section when its **whole** rectangle (`col`, `row`, `width`, `height`) lies within the section's rectangle, in the same region. Widgets without cells (auto-flow) are never inside one. Sections don't overlap each other. ::: ## In the builder ![A Pump cycle section on the Control page in the builder: the frame with its title on the top border around five widgets, the Stop button with a lock badge, and a Last command widget outside the frame](/tessera/img/builder-section.jpg) *A section framing five widgets; the lock on Stop shows that widget is [locked](/tessera/builder/#lock).* Drop a **Section** (Layout category) on the page and size it over the widgets you want to group, or drag it onto them: the widgets whose whole rectangle ends up inside belong to it. Membership is never stored; it is read from the cells every time. - **Move**: dragging the section (grab it in an empty part of the frame, a click on a widget inside selects that widget), the arrow keys or the *Column* / *Row* fields move the section **with its members** as one block, in one undo step. Drag a member out of the frame and it no longer belongs to it. - **Resize**: the section can't shrink past its members (it stops at their bounding box); growing it leaves them where they are, and the widgets that then fit inside belong to it. - **Duplicate** (Ctrl + D), **Copy / Paste** (Ctrl + C / Ctrl + V) and **Move to page** take the members along and keep their arrangement; the copy lands where the whole block fits. - **Overlaps**: a section shares cells with its widgets (they don't push it and it doesn't push them), but two sections never overlap: the one you drop or grow over another pushes it down, members included. **Align**, **Distribute** and **Match size** work on sections too. - **Delete** always asks what to do with the widgets inside: **Delete section only**, **Delete section and N widgets** or **Cancel**. One undo step. - A section only goes in grid regions; dragging it into a sidebar shows a hint and does nothing. - On the Phone preview a section is its header and dragging it moves the whole block (see below); the Tablet preview shows what a tablet shows. ## On phones and tablets A frame needs room, so below 768 px (and on a tablet with columns of its own, `tabletCols` above 0) a section becomes a **header**: a full-width line with its icon and title, no frame, followed right after by its members. The widgets of a section stay together, in one block, in reading order (row by row, left to right): - Inside the block the members follow their **`phoneOrder`**, then their reading order; a tablet with its own columns uses reading order only (it has no phone order). - The section's own position places the block: its **`phoneOrder`** (or its reading position) moves the whole block, members included. A widget that lies between the members in reading order but outside the frame goes after the block, not inside it. - **`hideOn`** on a section hides only its header; its members have their own. - A section with no title and no icon shows nothing on phones. - A tablet that follows the desktop grid (`tabletCols` 0, the default) keeps the frame and every cell where it is on the desktop. In the **Phone** preview, dragging a section header moves its block and writes only the section's `phoneOrder`; dragging a member reorders it inside its block, and a widget dropped on a member lands before or after the block. The header has no size handle (its height is fixed). ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Section` | Title on the top border (optional) | | `icon` | string | | [Lucide](https://lucide.dev/icons) icon before the title | | `background` | `none` · `surface` · `tint` | `none` | Fill of the frame: transparent, the surface of a tile, or a soft tint of the accent color | | `border` | boolean | `true` | Draw the border | Colors come from the theme, so the frame follows the dark and light themes and the accent color. Hidden on phones and tablets with `hideOn` like any widget. ## Input A section has no value: `msg.payload` is ignored and there is no output. `msg.ui` changes its properties, for example to mark a line that stopped: ```js msg.ui = { background: 'tint' }; // highlight the frame msg.ui = { label: 'Line 1 · STOPPED' }; // change the title msg.ui = { border: false }; // no border ``` --- # Synoptic Source: https://fgjcarlos.github.io/tessera/components/synoptic A live process diagram — tanks, pumps, valves, pipes, values and buttons on a zoomable SVG canvas, bound to the tag table. Draws a diagram (a P&ID, a mimic, a floor plan with live markers) as an SVG that scales to its tile, with optional zoom and pan. Every element is **bound to a tag** of the [tag table](/tessera/guides/tags/): a tank fills, a pump spins, a pipe flows, a value changes color, all in the browser. The default look is **Tessera** (process items in the accent, machinery in a second color, red and orange only for alarms); **ISA-101** (grey when everything is normal, color only when something needs attention) is one choice away, see [Themes](#themes). The widget lives in its own node set, `tessera-hmi`, which can be disabled in *Manage palette*. You don't have to write the diagram by hand: select the synoptic in the [builder](/tessera/builder/) and click **Edit synoptic** to draw it, with a symbol palette, pipes that route themselves and tags you drop on a symbol. See the [synoptic editor guide](/tessera/guides/synoptic-editor/). For a plant graphic, give its page the **Process screen** [layout](/tessera/concepts/layout/#process-screen): the synoptic fills the whole screen under the header, as in a SCADA, and scales to it, instead of being one tile among others in the grid. To show one machine instead of a whole plant, the [Equipment](/tessera/components/equipment/) card takes a library symbol and one tag per signal, with no diagram to draw. ### Normal: the tank fills while the pump runs The demo changes the tags every couple of seconds, as a `tessera-tags` node would. Click the pump or the buttons to see the confirmation (the demo sends nothing). ### Level above 90 %: a priority 1 alarm ### One tag gone stale The tank's tag is `stale` (no message for the table's *No data after*): the tank keeps its **last value**, dimmed and hatched, and stops blinking; the rest of the plant keeps running. ### One tag without data The same tag with `bad` quality (or no value at all): only the elements that use it show as *no data*, with `—`. ### State signature: priority, acknowledged, fault, manual, interlocked Color only means alarm, and attention is never *only* color. A **rail** under the symbol says the rest: the number of lit segments is the priority (P1 four … P4 one), **unacknowledged** segments are solid and chase, **acknowledged** ones are outlined and still. A symbol whose `fault` binding is on (a trip, an overload) is **in fault**: red contour and tint, a **solid red rail**, an **octagon ✖ badge** on its corner and the word **Fault** under the rail, in the Tessera and in the ISA-101 theme alike (the shape and the word are the cue, not only the red). *No data* is a dashed empty rail (and a dashed, hatched drawing), *stale* a row of fading dots, *manual* a solid rail with an **M**, *interlocked* a rail with end stops. The drawing itself only changes color, so a crowded screen stays calm. Nothing here needs a new field. The **priority** is the `N` of the `alarm-N` color a rule sets, and **unacknowledged** is `blink` (a rule without `blink` is the acknowledged alarm). **Manual** and **interlocked** are two optional boolean bindings, `manual` and `locked`, that any `symbol` may have (the rail of the first one that is on is shown). Only symbols get a rail (the other items have no box). When several apply the rail shows one: alarm, then fault, interlocked, manual, stale and no data. The rail code lives in its own chunk, downloaded when the first symbol needs it: a diagram of normal items never loads it. Running and stopped need no rail: a running symbol is tinted, a stopped one is hollow and recedes. ### Themes `canvas.theme` is **`classic`**, the **Tessera** look and the default, or **`isa101`**. Pick it in the synoptic editor (*Theme* in the canvas settings, shown when nothing is selected) or in the diagram JSON. **Tessera** uses two hues, both tokens that follow the dashboard accent and theme (dark and light): the **process side** (vessels, heat exchangers, valves, instruments and pipes) is drawn in the accent, the **machinery** (pump, motor, fan, compressor, conveyor) in the second chart color, and shapes (rectangle, circle, line, arrow) are neutral. Red and orange are only for alarms, and a stopped or stale item loses its hue and goes grey. State never rests on color alone: it is also the rail, the glyph and the label. A pipe's **bore is filled while its `flow` runs and hollow when it does not** (a pipe without a `flow` binding keeps a quiet tint). The class of a symbol follows its library entry (`rotating` equipment is machinery); a symbol of a pack counts as machinery when its name is `pump`, `motor`, `fan`, `compressor` or `conveyor`, and as process otherwise. With an amber accent the process hue falls back to the blue chart color, so it never looks like a warning. **ISA-101** is the grey of control rooms: one grey for everything normal, color only when something needs attention. It stays available for those who ask for it (a 24/7 wall may prefer it). A diagram saved before the Tessera theme keeps the `theme` it stored (`isa101` was the default then): nothing is migrated. A diagram without `theme` is Tessera. The viewer frames **what is drawn** plus a small margin, so the size of the canvas does not matter (a diagram in a corner of a big canvas still fills its tile; with a `canvas.bg` picture it shows the whole canvas). The diagram always fits the tile, also when it resizes, like a fixed operator screen: **zoom and pan are off by default**. Turn on the `zoom` property (*Zoom and pan controls*) for a large P&ID: then the wheel, pinch and the buttons at the bottom right zoom, drag pans and **double-click** on the background fits the diagram to the tile again (the demo above has it on). The motion is part of the widget: rotors spin up and coast down with inertia, levels settle with a slight overshoot, flow dots follow the value (faster with more flow), valves ease to their position, gauge needles and selector knobs turn to the value, a cylinder's piston and rod stroke with it, and colors cross-fade between states. With *reduced motion* set in the system, nothing animates: every part is drawn in its final state (a blinking element keeps its steady color). ## Properties | Property | Type | Default | Description | |---|---|---|---| | `label` | string | `Synoptic` | Title of the tile | | `topic` | string | | Sent as `msg.topic` by the commands | | `zoom` | boolean | `false` | Zoom and pan controls: the buttons, wheel, pinch, drag and double-click to fit. Off: the diagram stays fitted to the tile. Nodes saved before the option are off. `msg.ui.zoom` changes it | | `diagram` | object | empty | The diagram, see below. It is a JSON **object** in the node's config (not a string) | There is no `tag` property: the tags come from the diagram. Size: 6×4 by default. ## The diagram ```json { "v": 1, "canvas": { "w": 1200, "h": 700, "grid": 10, "bg": "media/plant.png", "theme": "classic" }, "items": [ … ] } ``` `canvas.bg` is a picture of the [media library](/tessera/guides/media-library/) behind everything (a floor plan with live markers); `theme` is `classic` (the Tessera look, the default) or `isa101` (grey), see [Themes](#themes). The order of `items` is the drawing order. | Item `type` | What | Fields | |---|---|---| | `symbol` | A symbol: `core/tank`, `core/pump`, `core/motor`, `core/fan`, `core/valve` (control valve), `core/heat-exchanger`, `core/isa-bubble`, `core/stack-light` or one from a symbol pack | `sym` (`/`), `x`, `y`, `w`, `h`, `rot`, `flip`, `click`; binds the properties of the symbol (tank: `level`, `value`, `fault`; pump, motor, fan, heat exchanger: `running`, `fault`; valve: `open`, `level` (stem position, 0–1), `fault`; ISA bubble: `value`; stack light: `red`, `amber`, `green`, 0–1 or a boolean tag; a pump, motor or fan can also bind a number `speed` (0–1 by `span`) instead of `running`) | | `pipe` | A line of stored points, drawn as a hollow tube with rounded elbows below the other items | `pts` `[[x, y], …]`, `kind` (`pipe`, `belt`, `signal`); binds `flow`: a boolean tag moves the flow dots, a number sets their speed (give it a `span`, so `[0, 160]` makes 80 half speed). Without `flow` the pipe is still | | `text` | Fixed text | `x`, `y`, `text`; may bind `text` | | `value` | A formatted number or text | `x`, `y`; binds `value` | | `command` | A button | `x`, `y`, `label`, `cmd` | | `image` | A picture of the media library | `src` (`media/`), `x`, `y`, `w`, `h` | Every item has an `id` (`[a-z][a-z0-9_-]{0,31}`, unique). ### Bindings `bind.` links a property to a tag: | Field | Description | |---|---| | `tag` | Full tag name, `/` | | `k`, `off` | Scale a number: `x = raw × k + off` (default 1 and 0) | | `span` | `[min, max]` (in units of `x`) that maps a numeric property to 0–1, like the tank level (default `[0, 1]`) | | `rules` | Ordered list, the first that matches wins: `{ op, v, set }` with `op` in `eq ne gt ge lt le` (no `op` is the "otherwise") | | `set` | What a rule does to the whole item: `color` (`normal ok warn alarm alarm-1`…`alarm-4 muted accent`), `blink`, `hide`, `text` (`{v}` is the formatted value) | | `fmt` | `{ dec, unit }`: decimals and unit | A boolean property switches a state (`running`, `open`), a number moves a level, text fills the symbol's value. **A tag with no value or `bad` quality shows the element as *no data*** (greyed, `—`, no rules applied) and only that element: the veil of other widgets is not used here. A **stale** tag keeps its last value: the element is dimmed and hatched, does not blink or move, and its rules still apply. `manual` and `locked` are two more boolean properties a symbol may bind, drawn by the [state signature](#state-signature-priority-acknowledged-manual-interlocked). ### Commands A `symbol` or `command` item with a `cmd` is clickable (a symbol with bound tags opens its [faceplate](#click-action-and-faceplate) instead, where the command is; `click: "command"` sends it directly). The browser sends only the item's id: the runtime looks the item up in the stored diagram and takes the action and the value from there. | `action` | Sends | Notes | |---|---|---| | `set` | `cmd.value`, or a number the operator types (`"ask": "number"`, with `min` and `max`, validated by the runtime) | | | `toggle` | The opposite of the current value of `cmd.tag` | Refused when the tag has no value, is `bad` or stale | | `pulse` | `cmd.value` (default `true`), then its opposite after `cmd.ms` (default 500, up to 10 000) | Two messages; if Node-RED stops between them the first one stays | | `goto` | Nothing: opens the page in `cmd.page` | Browser only | `cmd.confirm` (text up to 200 characters) asks for confirmation before sending. It is convenience, not security: Tessera has no users yet and `cmd.roles` is reserved. Nothing is written to a device: wire the output to the driver node you trust. ### Click action and faceplate `click` says what a click (or Enter or Space) does: | `click` | What happens | |---|---| | `auto` (default, not stored) | A symbol with bound tags (`bind`) opens its **faceplate**, with its command inside if it has one: one click never starts a pump. A symbol with a `cmd` and no bound tags (a button-like symbol) sends its command. Anything else does nothing | | `faceplate` | Opens the faceplate, whatever the symbol has bound | | `command` | Sends the command at once, as a click did before faceplates (nothing happens without one) | | `none` | Does nothing | | `{ page: '' }` | A **link** to another page of the dashboard (see below) | The **faceplate** is a dialog (focus trapped inside, Esc or a click outside closes it) loaded only when it is first needed. It shows the symbol's name, its state (*Running*, *Stopped*, *Alarm P2*, *Fault*, *Stale* or *No data*, from the same bindings that draw it), a **trend** of its main value (`value`, else the first number) and one row per binding with its tag, scale, unit and format. With a command it has the buttons for it, each asking for confirmation: a `toggle` is **Start** and **Stop** (the one that would change nothing is disabled when the symbol's `running`, or the command's own tag, says so), a `set` of `true` or `false` is that one, a number is typed in, and any other value or a `pulse` is one button. They send exactly what `click: "command"` would send: `{ item, action, value }` on the node's output, with the action and the value taken from the stored diagram. A `goto` has no button. **Links between screens.** `click: { page: '' }` turns a click (or Enter or Space) into going to another page of the dashboard. It works on a symbol and on a block that is not a pipe (a `text`, `value`, `command` button or `image`): a general plant screen where you tap the *Line 1* block and land on the Line 1 screen, with a button there that takes you back. The link names the page by its **id** (the id of the `tessera-page` node), so renaming the page's path does not break it. The item gets the pointer cursor, can be focused and its accessible name is *Go to <page title>*. A link is an explicit choice: it wins over *auto*, so a pump with bound tags and a link goes to the page instead of opening its faceplate. It sends no message to the flow. A link to a page that does not exist or is not deployed is **not clickable** (no pointer, no focus) and the editor warns about it; it does not fall back to the faceplate or the command. The trend has no server history: it shows the values the browser has received **since the page was opened**, up to 5 minutes, and says so; a reload starts it again. ```js { id: 'p101', type: 'symbol', sym: 'core/pump', x: 180, y: 130, w: 80, h: 90, // click: 'auto' → the faceplate bind: { running: { tag: 'PLC1/P101_Run' }, value: { tag: 'PLC1/P101_Flow', fmt: { dec: 1, unit: 'm³/h' } } }, cmd: { action: 'toggle', tag: 'PLC1/P101_Run' } } ``` ## Tags A synoptic gets data **only** from the tag table: a `msg.payload` on its input is ignored. Send the values of your PLC to a [`tessera-tags`](/tessera/guides/tags/) node named `PLC1` and the diagram binds `PLC1/Tank1_Level`, `PLC1/P101_Run`… The example `examples/tessera-tags.json` has a working synoptic. ## Input ```js msg.payload = 42; // ignored: values come from the tags msg.ui = { label: 'Line 2' }; // change a property ``` ## Output An operator command emits one message on the node's output, with the browser that sent it in `_client`: ```js { payload: { item: 'pump', action: 'toggle', value: false }, topic: 'synoptic', // the node's topic _client: { id: 'c8f2…' } } ``` `pulse` emits two (`value: true`, then `false` after `ms`); `goto` emits none. A command the runtime does not accept (an unknown item, a number out of range, a `toggle` without good data) emits nothing and logs a warning on the node. ## Limits A diagram over a limit is **rejected whole** (a half-drawn plant looks like a normal one): the node turns red with the reason (`diagram too large: 310 KB, limit 256 KB`), the tile shows it and the rest of the dashboard keeps working. | Limit | Value | |---|---| | Serialized JSON | 256 KB | | Items (pipes count) | 500 | | Bindings per item / rules per binding | 8 / 16 | | Points per pipe | 64 | | Distinct tags | 500 | | Canvas | 10 000 × 10 000 units, texts up to 200 characters | The diagram does not travel with the dashboard's `init`: the tile downloads it (cached by content) when it shows up, and each symbol is a separate SVG file downloaded only when a diagram uses it. --- # Symbols Source: https://fgjcarlos.github.io/tessera/components/symbols The core symbol library of the Synoptic widget — tanks, pumps, valves, instruments, lamps, values and commands — drawn live in the ISA-101 and Classic themes. The [Synoptic](/tessera/components/synoptic/) widget draws a process diagram from **symbols**: small SVG drawings with a manifest that says which properties you can bind and where pipes connect. Tessera ships {manifests.length} of them as `core/` (and a `text`, `pipe` and `image` item for the rest), all drawn in one **Duotone** style: a 2-unit contour, quiet details, and a tint made of one state color in three strengths, so grey stays grey and an alarm lights the whole drawing. Everything on this page is the real widget fed by a simulated tag table, and the tables are generated from the manifests, so a new symbol shows up here by itself. A symbol goes in a diagram as `{ "type": "symbol", "sym": "core/pump", "x": 20, "y": 40, "w": 80, "h": 90, "bind": { "running": { "tag": "PLC1/P101_Run" } } }`. The **size** below is the natural box, and `w` / `h` stretch it. The demos change the tags every couple of seconds, so you see each prop at work: rotors spin up and coast down, levels settle, valves ease, lamps glow. // What every prop shows at step `s`: a boolean switches, `level` sweeps, other numbers are lamps (one lit at a time), text is a number. // One diagram per category: the symbols in rows with their id below, and the tag table of each step. ## Shapes Plain geometry for frames, areas, arrows and dividers. They have no bindable properties: use a rule's `color` and `hide` to make them react. ## Lines Lines are **items**, not symbols: a `pipe` is a list of points drawn as a hollow tube with rounded elbows, and its `kind` makes it a conveyor `belt` or a thin `signal` line. A pipe may bind `flow` to a boolean tag (the flow dots move) or to a number (their speed). Without `flow` it is still. ## Equipment Rotating equipment stands on a base at `y = 90` and its inlets and outlets sit on the **process axis** `y = 50`, so a row of pumps, fans and valves lines up. Nozzles are 8 units wide and end in a 16-unit flange, the width a pipe meets without a reducer. ## Instruments ## States Lamps have their own colors (`--hmi-alarm-1`…, `--hmi-normal`) and glow with the number they bind: a boolean tag lights them too (`true` is 1). ## Values ## Commands A symbol (or a `command` item) with a `cmd` is clickable: see [Commands](/tessera/components/synoptic/#commands). The demo sends nothing. ## Themes **ISA-101** (the default, used above) is grey when everything is normal and colors only what needs attention. **Classic** colors the equipment. Set it with `canvas.theme`; the drawings are the same, only the tokens (`--hmi-normal`, `--hmi-alarm-1…4`…) change. Both follow the dark and light themes: switch the page's theme to check. ## State signature Color only means alarm, and attention is never *only* color: a **rail** under the symbol says the priority (one to four lit segments) and whether the alarm is acknowledged. The four pumps below share a tag that goes normal → unacknowledged (solid segments that chase, the drawing blinks) → acknowledged (outlined and still) → normal. The rail code is a separate chunk, downloaded when the first symbol needs it. More about it, with manual, interlocked, stale and no-data rails, in [Synoptic](/tessera/components/synoptic/#state-signature-priority-acknowledged-manual-interlocked). A tag with **stale** quality keeps its last value, dimmed and hatched; only **bad** (or no value) shows `—`. ## For tools and agents [`catalog.json`](/tessera/catalog.json) has a top-level `symbols` key: `symbols.list` has every core symbol (`id` as `core/`, `label`, `category`, `tags`, `size`) with its `props` (what an item can bind: `name` and `type`, number, text or boolean) and its `ports` (where a pipe connects: `id`, `x` and `y` from 0 to 1 of the box, `dir`), generated from the manifests in `ui/symbols/core/`. A running dashboard also lists the symbols of extension packs at `//symbols/index.json`, with the same fields. ## Write your own symbols A [widget package](/tessera/guides/widget-package/#symbol-packs) adds symbols with `defineSymbolPack(id, { dir })`: a folder of `.svg` + `.json` pairs, cited in diagrams as `/`. Draw them to match the core ones: - **Grid**: coordinates snap to 5 units, the box is a multiple of 10 and `viewBox` equals the manifest `size`. Inlets and outlets of in-line equipment sit on `y = 50`, rotating equipment on a base at `y = 90`, nozzles 8 wide with a 16-unit flange. Ports go in the manifest, never in the SVG. - **Stroke**: a 2-unit contour set on the root ``; details at 1 unit and 50 % opacity; moving parts 1 to 1.2. Allowed widths: 1, 1.2 and 2. - **Color**: only through tokens, never hex or `url()`: `style="stroke: var(--sym-state, var(--hmi-normal))"`. Depth comes from stacked fill opacities (`.09` plus a `.07` highlight band), with no gradients, filters, masks or ``. - **Parts**: mark what moves with `data-part`: `body`, `fill`, `level` (fill only, scaled from its bottom edge), `rotor` (spins around its centre), `flow` (dashed, the dash period divides 16), `value` (one ``, filled by the viewer) and `lamp` (its own token color and a numeric glow). A symbol never carries motion: the viewer animates the parts and stops when the system asks for reduced motion. - **Limits**: one ``, at most 4 KB, no `