Skip to content

Interface: TextFont ​

Experimental

A font request: CSS family list, size in CSS px, weight, and style, plus Plotly's paint-level font attributes (variant, textcase, lineposition, shadow).

Properties ​

PropertyTypeDescription
familystringExperimental CSS font family list, e.g. 'Inter, "Open Sans", sans-serif'.
lineposition?stringExperimental Decoration lines, e.g. 'under', 'under+through'. Default 'none'.
shadow?stringExperimental CSS text-shadow: 'none' (default), 'auto' (a thin halo in the text color's contrast color), or e.g. '1px 1px 2px black'. Only the first shadow of a list is drawn.
sizenumberExperimental Font size in CSS px (em-box height).
style?TextFontStyleExperimental Default 'normal'.
textcase?TextFontTextCaseExperimental Default 'normal'. Changes the drawn (and measured) text.
variant?TextFontVariantExperimental Default 'normal'. Changes the drawn (and measured) text and size.
weight?TextFontWeightExperimental Default 400.

Released under the MIT License.