Params

label
string

Text for the panel label in the Makeswift Visual Builder.

variant
boolean
default:
"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
object
default:
"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

defaultValue: {
  fontFamily: 'var(--font-grenze-gotisch)',
  fontStyle: 'italic',
  fontWeight: 700,
},

Prop type

The Font control passes an object with the following properties:

{
  fontFamily: string;
  fontStyle: string;
  fontWeight: number;
}