Skip to content
  • There are no suggestions because the search field is empty.

Using unified component styles (CSS)

Add custom styles to the components in Pages

After reading this article, you’ll know the following:

  • What unified component styles are

  • How to save and apply custom CSS stylings to your page components

  • How to reuse styles, save edits, and revert changes

What is a unified component style?

Unified component styling empowers builders with control over component design. With custom CSS properties, you can easily add any CSS property to default components, customizing their appearance to your specifications.

betty-blocks.intercom-attachments-7.comio1085649382ce7433855bbac8a121f34368AD_4nXca56GHH_8xEIYEoMXXpCIq-5gLIY3cpXK5-o5-6L9YxB9M09CbBCFlxiYGU3D2_

 

Additionally, you can create, save, and reuse groups of CSS properties as 'Styles', building up consistency across your applications. This feature integrates with custom components, allowing low-code developers to maintain a uniform design experience across all component types.

Creating and saving styles

Let’s look at how to create and save a new component style straight from Pages. Add any of the default page components to your canvas. For example, it can be the Text component on the top of the card made of a Box.

  • Drag and drop the Text on a page canvas (1). In its options, head to the Styles tab (2):

    • See the Default style applied

betty-blocks.intercom-attachments-7.comio10856493991819061611f591d79a248d0fAD_4nXfhOTNuqGHkRTAnCnS6dO5VAbozG0zAdPNe0QLQVYD3cpqkfddBpWgdjHG_gP8fG
  • To start applying styles, go down to CSS Properties and press Add CSS property (3)

    • On the left, you can add a property out of existing ones. Start typing the property (like ‘color’, ‘align-items’, ‘border’, etc.) or just click once on the input field to access a CSS properties reference window

    • In the right field, type in the value you want to set for the selected property. It's a color name in our case

Note: Check the CSS reference to read about properties you can use

betty-blocks.intercom-attachments-7.comio108564942089d100e075f69608e6f3cdfeAD_4nXfVv6jzniLIi4RfL2Ap6eCse6vPRwupvONZuHWW6CA3EFnxNeSx4_nvVVdtC2S6_
 

A value you set depends on the kind of CSS property, e.g. border, it would be: 10px solid red:

downloads.intercomcdn.comio1086569311fddc28ce26b991938ec6911223233
 

Using a double hyphen (--) in the value input, you can select the colors from the theme you've set via the Theme builder:

downloads.intercomcdn.comio108657881112a677802da076fd4ed66f86image
  • Add more customizations via the CSS Properties menu, and when you’re done - press Add as style (+) and then Save to save your new style.

downloads.intercomcdn.comio1085647055731ca7dfd5d5eb5692934397GIF2

Note: In some cases, you may need to add !important to your CSS values to ensure they are applied correctly. This is necessary when the same CSS properties are also available as styling options within the component options. We are currently working on providing a better solution instead of this workaround.

downloads.intercomcdn.comio109544524346e5424918b52eb11ceab625image
 

Reusing and editing styles

After saving your style, you can use the Style dropdown to apply it to similar components like Breadcrumb items or Card headers that contain text. This allows you to apply the saved styling across various elements effortlessly.

betty-blocks.intercom-attachments-7.comio1085649452645f5276a6470ae1611231efAD_4nXf8IPojW1jFMYRO_zLxeE5fvTZgbzULI_7jxa_dI3kNeaf6modoCukx4cCHYZk3P
 

You can add more CSS properties to the chosen/saved style, or delete any of the existing properties individually.

  • To remove all the new unsaved edits and return to the last saved version of your style, press the Reset to default button, or delete each CSS property separately via the small delete button next to a single property

  • To apply new changes to the style, press the Update button that will emerge as you make changes to the saved style

downloads.intercomcdn.comio1085648194e4546bdbd47e9acb6aae963eGIF3

Always verify if the component you intend to style supports the properties you wish to apply. For instance, attempting to set the background color of a Navigation bar may not be possible, as this component does not have that specific property.