Whitelist classes in Class component property

The class property is a great addition to components and allows you to let a client/editor apply a class or classes to a component easily.

As discussed in other threads, there are many instances with non-technical clients that having full access to all of the available classes is sub-optimal and can lead to confusion or fatigue.

Ideally we want to whitelist the classes that can be used on a per property basis, which will allow us to specify only applicable classes that the client/editor can choose from.

Rough mock up example:
Screenshot 2023-07-19 at 23.33.17

A simple example may be a booking calendar where they can mark a specific date as available or booked.

For us this is one of the most important features and will solve one of the biggest hurdles in WordPress editing for providing easy to use editing for less experienced clients.

1 Like

Hello @StrangeTech,

Thanks for this feature request.

I do remember your previous threads on whitelisting classes for specific uses, but was always a bit dubious about how we could translate that to an easy-to-use set up, while not getting tangled in a million different whitelisting categories.

With components - and your proposition here - it makes complete sense and can potentially make abstraction of the class environment that might not be so accessible for some users. I can see a lot of use cases.

Big :+1: from me.


Thank you @Louis, this is excellent news.