Skip to content

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:

VariableSet fromUsed by
--font-familyFontAll text, except icons and code (code, pre, kbd)
--radiusCorner radiusGroup cards, buttons (not icon buttons), input fields and menus
--radius-modalModal cornersDialogs 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 ​

PropertyDescriptionDefault
NameNode name shown in the editor.""
UIDashboard (ui-base) the style applies to.— (required)
FontInter Variable (served by the node) or System font (the operating system's font).Inter Variable
Corner radiusRadius of cards, buttons, fields and menus, from 0 to 24 px.8
Modal cornersRadius 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 ​

RoutePurpose
GET <httpNodeRoot>/ui-style/inter-latin-variable.woff2The 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.