@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?
optionalcolors?: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?
optionalaccent?:string
box?
optionalbox?:string
boxBorder?
optionalboxBorder?: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?
optionalboxText?:string
muted?
optionalmuted?:string
surface?
optionalsurface?:string
text?
optionaltext?:string
font?
optionalfont?: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?
optionalframe?: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?
optionalpixelArt?: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?
optionaltitleCaps?:boolean
Defined in: packages/sdk/src/tooltip-types.ts:112
Writes the title in capitals.