Style
The Style node sets the font and the corner radius of every page of a dashboard. It draws nothing: add one per dashboard. It defines three CSS variables on the page and applies them to the text and to the standard Dashboard 2 cards, buttons, fields, menus and dialogs; the widgets of this package also read the two radius variables:
| Variable | Set from | Used by |
|---|---|---|
--font-family | Font | All text, except icons and code (code, pre, kbd) |
--radius | Corner radius | Group cards, buttons (not icon buttons), input fields and menus |
--radius-modal | Modal corners | Dialogs and confirmations (not fullscreen dialogs) |
Without this node the widgets of this package fall back to their own values (8 px and 12 px for the corners, and the dashboard's font).
The Inter font is served by Node-RED itself, so it works on machines without internet access.
Palette: category Renders, label style. No input, no outputs.
Configuration
| Property | Description | Default |
|---|---|---|
| Name | Node name shown in the editor. | "" |
| UI | Dashboard (ui-base) the style applies to. | — (required) |
| Font | Inter Variable (served by the node) or System font (the operating system's font). | Inter Variable |
| Corner radius | Radius of cards, buttons, fields and menus, from 0 to 24 px. | 8 |
| Modal corners | Radius of dialogs and confirmations, from 0 to 24 px. | 12 |
A value that is not a number or is negative falls back to the default. A value above 48 px, which only a flow edited outside the dialog can have, is reduced to 48.
HTTP endpoints
| Route | Purpose |
|---|---|
GET <httpNodeRoot>/ui-style/inter-latin-variable.woff2 | The Inter font file (Latin subset), cached by the browser for 30 days. |
The route follows Node-RED's httpNodeRoot setting. The font only covers Latin characters; other scripts are drawn with the fallback font.
Status and errors
The node logs No UI configured and does nothing when no dashboard is selected.
Usage example
Add a style node to the flow, select the dashboard in UI, keep Font on Inter Variable, set Corner radius to 4 and Modal corners to 8, and deploy. Every page of that dashboard uses Inter, with 4 px corners on cards and buttons and 8 px corners on dialogs.