Define style basics
In XM Cloud Components, style design begins with defining the basic primitives. These primitives include fonts, colors, graphics, and custom breakpoints, which you can find under the Basics section.
Add a Google font
Typography is important for brand recognition, and because text content will be included in almost all your components, you have to define the fonts that can be used in all your styles.
To add a Google font to the Style library:
-
In the Styles builder, in the left pane, click Fonts.
-
Click Add font library at the top of the page.
-
In the Font type field, click Google.
-
In the Google font family drop-down menu, click the relevant font.
-
Choose the font styles you want by selecting the check box located under each style option.

After your font styles are activated, you can use them to create Typographies.
You can learn how to add custom font here.
Add a color
You can define the colors you want to use for your brand and organize them within different collections.
To create a new color collection:
-
In the Styles builder, in the left pane, click Colors.
-
Click Add collection at the top of the page.
To add a color to a collection:
-
In a color collection, click
.
-
Give the color a unique class name and confirm which collection it belongs to.
-
Click the color input that you want, for example, HEX or RGB , and enter the value of the color.
-
Set the opacity.
-
Click Save.

You can now use the color collection in style rules, with each color saved in the CSS to use in the Components builder. To copy the CSS variables, hover the mouse over a color in the Styles library and click CSS variables.
Add a breakpoint
With XM Cloud Components, you can create your own breakpoints and organize them in collections. Breakpoint elements are sorted from largest to smallest breakpoint within each collection.
To create a new breakpoint collection:
-
In the Styles builder, in the left pane, click Breakpoints.
-
Click Add collection.
-
Give a name to your collection, for example, Large, Medium, or Small.
-
Click Save.
You can add as many breakpoints as needed in each collection, as long as breakpoints do not intersect with each other.
To add a breakpoint to a collection:
-
In the breakpoint collection, click
.
-
Give a name to the breakpoint, for example, Extra extra large.
-
In the drop-down menu, click the collection the breakpoint belongs to.
-
Enter the pixel values at which the breakpoint starts and ends. Ensure that breakpoints do not intersect with each others, as it will create issues when using responsive versions of a component in a webpage.
-
Click Save.

All breakpoints built in the style library are available in the Components builder where you can use them to preview how a component will render on specific device types, or at certain screen widths. For teams building responsive designs that change content or layout depending on the viewer's screen size, it's best practice to create a new component version for each screen size, and to have all necessary breakpoints available in the style library.