Skip to main content

types.NumberSetting#

Defines a numeric setting with optional min/max bounds and step increment.

SYNTAX#

{ key: string; type: 'number'; label: string; default: number; min?: number; max?: number; step?: number }

ARGUMENTS#

  • key (string) — Setting key — used in the settings/ctx.settings object.
  • type ('number') — Discriminator.
  • label (string) — Display label in the UI.
  • default (number) — Default value.
  • min (number) — Optional lower bound.
  • max (number) — Optional upper bound.
  • step (number) — Optional step increment.

RETURNS#

Type definition.

EXAMPLE#

{ key: 'period', type: 'number', default: 14, min: 1, max: 200, step: 1, label: 'Period' }

SEE ALSO#

types.ColorSetting, types.BooleanSetting, types.SelectSetting, indicator.getSettings