Font

The Font control allows you select a fontFamily, fontStyle, and fontWeight.

Font control component in Makeswift Visual Builder

Params

label
string

Text for the panel label in the Makeswift Visual Builder.

description
string

The description shown in the Panel of the Makeswift builder. This can be written in Markdown format. Added in v0.24.8.

variant
booleanDefaults to true

A boolean to determine whether fontStyle and fontWeight are included in the final value. This value changes what panel inputs are shown in the Makeswift builder, and changes the type of defaultValue.

defaultValue
objectDefaults to false

The default value passed to your component when no value is available. This object includes three properties:

  • fontFamily - string
  • fontStyle - "normal" | "italic"
  • fontWeight - number

Without defaultValue the data passed to your component is optional.

Example

1defaultValue: {
2 fontFamily: 'var(--font-grenze-gotisch)',
3 fontStyle: 'italic',
4 fontWeight: 700,
5},

Prop type

The Font control passes an object with the following properties:

1{
2 fontFamily: string;
3 fontStyle: string;
4 fontWeight: number;
5}