Skip to main content

ValueBar

The Value widget is a slider control used to select a numeric value.

Properties

The ValueBar widget inherits from Widget class → Has all Widget properties.
  • orientation: OrientationTypes → The orientation.
  • value: number → The value.

Constructor

ParameterTypeRequiredDescription
idstringyesThe id of the widget
orientationOrientationTypesyesThe orientation of the widget
parentWidgetnoThe parent of the widget. Default is null
src/main.ts
import { ValueBar } from "@cedro/ui";

const myValue: ValueBar = new ValueBar("my-value", "vertical");

myValue.setValue(35);

Public Methods

setValue

Set the percentage value of the value bar.

Parameters

ParameterTypeRequiredDescription
valuenumberyesThe value.

Returns Value

void

Example

src/main.ts
myValue.setValue(35);

getValue

Get the percentage value of the progress bar.

Parameters

void

Returns Value

number

Example

src/main.ts
const value = myProgress.getValue();