跳转到主要内容

Settings Reference

The document is a reference to the available settings properties that you can configure via the settings object in theme.json. Each of the settings has an in-depth guide on how to use it within the Settings documentation.

Appearance Tools

settings.appearanceTools is a top-level property with no sub-properties nested beneath it. It is documented at Settings: Appearance Tools.

Property Type Default
appearanceTools boolean false

Border

settings.border is an object that supports the nested properties listed in the below table. It is documented at Settings: Border.

Property Type Default
color boolean false
radius boolean false
style boolean false
width boolean false

Enabling any one of the color, style, or width settings will automatically enable the other two since the properties are linked together.

Color

settings.color is an object that supports the nested properties listed in the below table. It is documented at Settings: Color.

Property Type Default Props
background boolean true —
custom boolean true —
customDuotone boolean true —
customGradient boolean true —
defaultDuotone boolean true —
defaultGradients boolean true —
defaultPalette boolean true —
duotone array array colors, name, slug
gradients array array gradient, name, slug
link boolean false —
palette array array color, name, slug
text boolean true —

Custom

settings.custom is an object that supports any number of nested custom properties, as shown in the below table. It is documented at Settings: Custom.

Property Type Default
custom.<custom> any —

Dimensions

settings.dimensions is an object that supports the nested properties listed in the below table. It is documented at Settings: Dimensions.

Property Type Default
minHeight boolean false

Layout

settings.layout is an object that supports the nested properties listed in the below table. It is documented at Settings: Layout.

Property Type Default
contentSize string ""
wideSize string ""

Lightbox

settings.lightbox is an object that supports the nested properties listed in the below table. It is documented at Settings: Lightbox.

Property Type Default
allowEditing boolean true
enabled boolean false

This setting is only available as of WordPress 6.4 and is specific to the core Image block (core/image).

Position

settings.position is an object that supports the nested properties listed in the below table. It is documented at Settings: Position.

Property Type Default
sticky boolean false

Shadow

settings.shadow is an object that supports the nested properties listed in the below table. It is documented at Settings: Shadow.

Property Type Default Props
defaultPresets boolean true
presets array array name, shadow, slug

Spacing

settings.spacing is an object that supports the nested properties listed in the below table. It is documented at Settings: Spacing.

Property Type Default Props
blockGap boolean null null
customSpacingSize boolean true —
margin boolean false —
padding boolean false —
spacingScale object object operator, increment, steps, mediumStep, unit
spacingSizes array array name, size, slug
units array [ "px", "em", "rem", "vh", "vw", "%" ] —

Typography

settings.typography is an object that supports the nested properties listed in the below table. It is documented at Settings: Typography.

Property Type Default Props
customFontSize boolean true —
dropCap boolean true —
fontFamilies array array fontFace, fontFamily, name, slug
fontSizes array array fluid, name, size, slug
fontStyle boolean true —
fontWeight boolean true —
fluid boolean false —
letterSpacing boolean true —
lineHeight boolean false —
textColumns boolean false —
textDecoration boolean true —
textTransform boolean true —
writingMode boolean false —

Use Root Padding Aware Alignments

settings.useRootPaddingAwareAlignments is a top-level property with no sub-properties nested beneath it. It is documented at Settings: Use Root Padding Aware Alignments.

Property Type Default
useRootPaddingAwareAlignments boolean false

This setting works together with styles.spacing.padding in theme.json. If enabled, styles.spacing.padding must be an object that defines the top, right,  bottom, and left styles separately.