Skip to main content

Interface: LegendIconDecoration

Defined in: packages/sdvtables/src/spec.ts:798

reactablefmtr add_icon_legend: a row of icons with labels above or below the table. Either a preset iconSet (reactablefmtr's "ski rating", "medals" or "batteries", with its colours and labels) or your own icons, one colour and one label each. Pass iconSet or icons, not both. reactablefmtr's centered argument is not ported (align places the row left or right).

Properties​

align​

readonly align: "left" | "right"

Defined in: packages/sdvtables/src/spec.ts:814


colors?​

readonly optional colors?: readonly string[]

Defined in: packages/sdvtables/src/spec.ts:805

One CSS colour per custom icon (recycled when shorter).


readonly optional footer?: string

Defined in: packages/sdvtables/src/spec.ts:813

Small muted line below the icons.


icons?​

readonly optional icons?: readonly LegendIconShape[]

Defined in: packages/sdvtables/src/spec.ts:803

Custom shapes, used when iconSet is absent.


iconSet?​

readonly optional iconSet?: "ski rating" | "medals" | "batteries"

Defined in: packages/sdvtables/src/spec.ts:801

reactablefmtr's preset icon_set; its labels can be renamed with labels (same count).


iconSize​

readonly iconSize: number

Defined in: packages/sdvtables/src/spec.ts:818

Icon height in px (reactablefmtr: font-size 16px).


labels?​

readonly optional labels?: readonly string[]

Defined in: packages/sdvtables/src/spec.ts:807

One label per icon; required with icons when showLabels is true (otherwise each shape's name is its accessible name).


location​

readonly location: "top" | "bottom"

Defined in: packages/sdvtables/src/spec.ts:816

reactablefmtr appends the legend after the table: "bottom".


showLabels​

readonly showLabels: boolean

Defined in: packages/sdvtables/src/spec.ts:809

Write each label beside its icon; false keeps the label as the icon's accessible name only.


title?​

readonly optional title?: string

Defined in: packages/sdvtables/src/spec.ts:811

Bold line above the icons.


type​

readonly type: "legendIcon"

Defined in: packages/sdvtables/src/spec.ts:799