Default Border Values

PropertyDefault ValueDescription
Width1pxStandard border thickness
StylesolidBorder line style
Colorneutral-200Light gray border color
Radius6pxCorner rounding

Border Radius

The default border radius of 6px provides a subtle, modern rounding to elements. This value applies to:

Applying Border Radius in the Editor

  1. Select a block that supports border settings.
  2. In the block settings sidebar, find the Border section.
  3. Click the Radius control.
  4. Enter a value or use the slider.
  5. For individual corner control, click the unlink icon to set each corner independently.

Common Radius Values

UsageRecommended Value
Cards and panels6px (default)
Buttons6px (default) or pill (9999px)
Input fields6px (default)
Avatars and circular elements50%
Subtle rounding4px
No rounding0px

Border Width

The default border width of 1px provides a clean, subtle boundary. Blocks that support borders allow you to adjust the width:

  1. Select the block.
  2. In the Border section of block settings, click the width control.
  3. Enter a pixel value.
UsageWidth
Standard card borders1px
Emphasis borders2px
Decorative dividers2px–4px
Heavy separators4px–8px

Border Color

The default border color is neutral-200, a light gray that provides subtle separation without visual noise.

Changing Border Color

  1. Select a block with border support.
  2. In the Border section, click the color swatch.
  3. Choose from the preset palette or enter a custom color.
ContextRecommended Color
Default borders (light mode)neutral-200
Active/focused elementsprimary-500
Success indicatorssuccess-500
Warning indicatorswarning-500
Error indicatorserror-500
Subtle separationneutral-100

Border Style

The default border style is solid. Other CSS border styles are available through custom CSS:

StyleAppearanceUsage
solidContinuous lineDefault, most common
dashedDashed linePlaceholder areas, drop zones
dottedDotted lineSubtle separation, decorative
noneNo borderRemove inherited borders

Using Borders in the Editor

Adding a Border to a Block

Add a border and radius from the Border & Shadow panel.

  1. Select a block (Group, Column, Image, or similar).
  2. In the right sidebar, expand the Border section.
  3. Set the Width (for example, 1px).
  4. Set the Color using the color picker.
  5. Optionally adjust the Radius for rounded corners.

Individual Side Borders

For blocks that support it, you can set borders on individual sides:

  1. In the Border section, click the unlink icon.
  2. Set border properties for Top, Right, Bottom, and Left independently.
  3. This allows effects like a left accent border or bottom divider.

Example: Left Accent Border

A common design pattern uses a thick left border for emphasis:

This creates a visual accent strip on the left edge of a quote or callout.

CSS Custom Properties

Border tokens are available as CSS custom properties:

Copied!
CSS
var(--wp--custom--border--width) /* 1px */var(--wp--custom--border--style) /* solid */var(--wp--custom--border--color) /* var(--wp--preset--color--neutral-200) */var(--wp--custom--border--radius) /* 6px *//* Usage example */.my-element { border: var(--wp--custom--border--width) var(--wp--custom--border--style) var(--wp--custom--border--color); border-radius: var(--wp--custom--border--radius);}

theme.json Configuration

Border settings are defined in theme.json:

Copied!
JSON
{ "settings": { "border": { "color": true, "radius": true, "style": true, "width": true }, "custom": { "border": { "width": "1px", "style": "solid", "color": "var(--wp--preset--color--neutral-200)", "radius": "6px" } } }}

The border defaults are custom tokens in settings.custom.border, not a global styles.border rule. WordPress outputs them as --wp--custom--border--width, --wp--custom--border--style, --wp--custom--border--color, and --wp--custom--border--radius. Blocks and elements opt in by referencing them. For example, styles.elements.button and core/preformatted use var(--wp--custom--border--radius).

Borders and Dark Mode

Dark mode remaps the palette shades (a light shade swaps with its dark counterpart), so a border set to neutral-200, including --wp--custom--border--color, turns dark automatically. Borders stay visible in both color modes without extra CSS. See Dark Mode.

Design Guidelines

When to Use Borders

When to Use Shadows Instead

Combining Borders and Shadows

Borders and shadows can work together. A common pattern is a light border combined with a subtle shadow:

Copied!
CSS
.card { border: 1px solid var(--wp--preset--color--neutral-200); box-shadow: var(--wp--preset--shadow--xs); border-radius: var(--wp--custom--border--radius);}

Next Steps