selectFontWeight()

Opens the editor's font weight picker for the selected component, letting a Wix user choose a weight for a given font family.

Syntax

Copy

Parameters

params accepts one of the following shapes:

For more information on this choice, see Picker arguments.

Manifest key

Connects the picker to one or more manifest style fields, so the selected weight saves automatically.

NameTypeDescription
fontFamilyStyleItemKeystringKey of the manifest style field that stores the font family. Pass together with fontWeightStyleItemKey.
fontWeightStyleItemKeystringKey of the manifest style field that stores the font weight. Pass together with fontFamilyStyleItemKey.

Or, if a single field stores both:

NameTypeDescription
fontStyleItemKeystringKey of the manifest style field that stores the combined font shorthand.

Explicit options

Opens the picker without connecting it to the manifest. Use the callback to apply the selected weight yourself.

NameTypeDescription
fontFamilyobjectFont family to filter the available weights by, as { family, weight }. Omit to show all weights.
targetHTMLElementElement in your panel that the picker popup opens relative to.
onChangefunctionCalled with the selected weight.

Returns

Promise<IFontWeight>

The selected weight.

Example

Copy

See also

Last updated: 8 September 2026

Did this help?