Skip to main content

Interface: PriceToggleProps

Defined in: components/PriceToggle.tsx:11

Properties

className?

optional className?: string

Defined in: components/PriceToggle.tsx:45

Extra CSS class applied to the root element.


inclExclVatSwitched?

optional inclExclVatSwitched?: (on) => void

Defined in: components/PriceToggle.tsx:42

Parameters

on

boolean

Returns

void

Deprecated

Use onChange instead. Alias kept for back-compat with existing call sites; receives the same boolean as onChange.


initialState?

optional initialState?: boolean

Defined in: components/PriceToggle.tsx:36

Uncontrolled mode: initial state of the toggle. Ignored when value is supplied (controlled mode). Defaults to true (incl. VAT).


label?

optional label?: string

Defined in: components/PriceToggle.tsx:16

Label text shown beside the toggle. Defaults to 'Prices:'.


labels?

optional labels?: Record<string, string>

Defined in: components/PriceToggle.tsx:49

Translated labels keyed by the slugs used inside the component (pricesLabel, inclVat, exclVat). Missing keys fall back to English.


onChange?

optional onChange?: (on) => void

Defined in: components/PriceToggle.tsx:29

Controlled mode: notified on every flip with the new state. Required when value is supplied. Optional otherwise (uncontrolled).

Parameters

on

boolean

Returns

void


value?

optional value?: boolean

Defined in: components/PriceToggle.tsx:23

Controlled mode: current on/off state (true = incl. VAT). When supplied, the component does not own its state — the parent does. Pair with onChange to receive flips.