Skip to content

BarProps beta ​

Interface of @v12-engine/client/hud

ts
export interface BarProps

What a Bar is given

Members ​

class ​

ts
class?: string;

CSS classes added to the bar's element

extra ​

ts
extra?: {
        value: number;
        color?: string;
    };

What more it holds after the value, drawn in its own colour: a shield after the health

label ​

ts
label?: JSX.Element;

Words on the bar, in its middle: 864 / 1,100

max ​

ts
max?: number;

1 when left out: value is then a part

name ​

ts
name?: string;

What it is, for who cannot see it: "Health"

size ​

ts
size?: BarSize;

How tall it is: sm when left out; a bar with a label or trailing words is never under md, which holds them

ticks ​

ts
ticks?: number;

A line every so much of it: a mark every 100 health

tone ​

ts
tone?: HudTone | 'health-auto' | (string & {});

What it is coloured by: a tone of the theme, 'health' by how much is left (green, yellow, red), or a CSS colour

trailing ​

ts
trailing?: JSX.Element;

Words at its right end: +6.2

value ​

ts
value: number;

How much is filled, in the same unit as max