Skip to content

@tavora/sdk / TooltipSkin

Interface: TooltipSkin ​

Defined in: packages/sdk/src/tooltip-types.ts:80

A module's own look for its item cards (ui.tooltip.defineSkin): checked values, never CSS. Files are bundle-relative paths in the module's own dist/, like image. Tavora sets every size, keeps the theme font for the type line, properties, sections and footer, and refuses a skin whose colours are hard to read.

Properties ​

colors? ​

optional colors?: object

Defined in: packages/sdk/src/tooltip-types.ts:94

The card's colours as #rrggbb. They stay the same in every theme. With colors, surface and text are needed; muted and accent default to text, box to surface and boxText to text. Text, muted text, the box's text and the accent in the box need a contrast of 4.5:1 with what they sit on, the accent on the surface 3:1.

accent? ​

optional accent?: string

box? ​

optional box?: string

boxBorder? ​

optional boxBorder?: string

A 2 px edge around the effect box; it needs a contrast of 3:1 with box. Left out, a skinned box has no edge. Needs sdk.supports("ui.tooltip.boxBorder"): on an older Tavora the SDK leaves it out of defineSkin.

boxText? ​

optional boxText?: string

muted? ​

optional muted?: string

surface? ​

optional surface?: string

text? ​

optional text?: string


font? ​

optional font?: string

Defined in: packages/sdk/src/tooltip-types.ts:108

A WOFF2 font (up to 512 KB) for the title and the effect box only; letters it lacks come from the theme font.


frame? ​

optional frame?: object

Defined in: packages/sdk/src/tooltip-types.ts:85

A nine-slice frame around the card: a PNG or WebP picture (up to 512 KB) and its slice insets in pixels, top, right, bottom, left (0 to 64 each), which are also the frame's width on the card.

image ​

image: string

slice ​

slice: [number, number, number, number]


pixelArt? ​

optional pixelArt?: boolean

Defined in: packages/sdk/src/tooltip-types.ts:110

Draws the picture and the frame with hard pixels instead of smoothing them (pixel art).


titleCaps? ​

optional titleCaps?: boolean

Defined in: packages/sdk/src/tooltip-types.ts:112

Writes the title in capitals.

For Tavora 0.24.58 and @tavora/sdk 0.3.20. Code under the MIT License. The Tavora name and logo are not covered by it.