Default

Function: default()

function default(props): Element

Defined in: src/components/leaderboard/scorebar-component.tsx:13

Scorebar Component This component renders a horizontal score bar that visually represents a score as a percentage. The score is clamped between 0 and 100 to ensure it does not exceed the valid range. The bar's width is animated to transition smoothly when the score changes.

Parameters

props

The properties passed to the component.

className?

string = ''

Optional additional class names for styling the score bar.

height?

number = 30

The height of the score bar, default is 20 pixels.

score

number

The score to be represented as a percentage (0-100).

Returns

Element

A JSX element that represents the score bar.