Hi Bricks team,
Iβd like to request a feature that would improve the Component + Variant workflow in Bricks: conditional rendering of elements based on the selected component variant.
Use case:
When creating a reusable component with multiple variants (for example primary, secondary, outline, icon-only), it would be useful to control which internal elements appear depending on the active variant.
Example:
-
Variant: primary β show label and icon
-
Variant: icon-only β show icon, hide label
-
Variant: outline β show label, hide background element
Currently this requires workarounds like duplicating components or relying on custom CSS/JS.
Suggested implementation:
Add a condition in the element Conditions panel such as:
Component Variant β is β [variant name]
This would allow elements inside a component to render only when a specific variant is active.
Benefits
-
Cleaner component structure
-
Fewer duplicated components
-
Easier to maintain design systems
-
More flexible component variants
I think this would make components and variants much more powerful and easier to use.
Thanks for considering this feature.