Skip to content

Add Box Shadow Component #44651

@phil-sola

Description

@phil-sola

What problem does this address?

So as of Gutenberg 14.1 and in the upcoming WordPress 6.1 release, there will be support added for themes to register box shadows for specific blocks within the theme.json file.

Similar to padding, margin, typography, etc. I feel like it would be beneficial to actually have a box shadow component either for importing from a package for custom blocks or supported in core blocks which would enable users to create the exact shadow effect they are looking for.

What is your proposed solution?

Adding a box-shadow component within one of the packages which can be imported for custom block development or supported in core blocks which would enable users to create the exact shadow effect they are looking for.

Something like the 'Customize shadows' section on the left in this link: (https://box-shadow.dev/)

Including horizontal, vertical, blur, spread, and colour.

I searched issues for 'box shadow' and 'box-shadow' and couldn't find anything on this, however, I know it might already be something being looked at, apologies if so.

Design

shadows
  • Shadow panel is empty by default.
  • Clicking + opens a menu where you can choose shadows from three categories:
  • When a preset is added;
    • Clicking the row will re-open the menu so you can switch to a different preset
    • Clicking the icon will remove the shadow
    • Clicking the unlink icon will detach the shadow properties, essentially switching from the preset to a custom shadow...
  • When custom shadow(s) are added;
    • Clicking a row will open a popover where you can edit the associated shadow properties.
    • Clicking + will add a new shadow to the stack
    • Clicking will allow you to save the custom shadow as a preset for future use

Tasks

Metadata

Metadata

Assignees

Labels

[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.

Type

No type
No fields configured for issues without a type.

Projects

Status

✅ Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions