Add Custom Block Supports to Core Block


I’m wondering if there’s a way to add a custom block support (possibly the wrong terminology) to a core block. I understand that it’s possible to turn existing block supports off and on and also to add custom block styles via PHP and theme.json but would really like to leverage a number entry for a custom use.

Specifically, I’d like to add a ‘translateY’ value entry to the image block. Something like in the attached image. I’ve already added ‘Translate Up’ and ‘Translate Down’ custom styles which transform:translate(Y):-50% and transform:translate(Y):50% respectively but the designs that I’ve now been provided with now require more flexibility, ideally sliding to choose a percent value between -100 and 100.

Translate Y Block Style

Is this possible currently and what should I be Googling? Thanks.

Kevin Nugent 1 month 2023-04-19T06:07:58-05:00 0 Answers 0 views 0

Leave an answer