Helper or utility classes are preset classes that allow you to customize widgets without adding any additional CSS.
These classes cover common properties such as padding, margin, border-radius, positioning, colors, and more. They are included in the framework to make it easier to customize the appearance of widgets on your website.
Let’s look at the following example of a button:
<a class="hs-button" href="https://www.matrix-framework.com/" target="_blank">Button</a>
As you can see, the button’s styles are defined by global CSS: background color, font size, and left alignment (by default).
Now, let’s add some helper classes to apply different styles directly in the widget/HTML:
<a class="hs-button bg-pumpkin br5 size-18" href="https://www.matrix-framework.com/" target="_blank">Button</a>
In this example, the following helper classes are used:
This allows you to customize the button directly in the HTML without writing additional CSS.
There are many helper classes available, and once you start using custom widgets you’ll naturally become familiar with the most common ones. However, to avoid searching through the documentation every time you’re unsure which classes exist, there’s a smart shortcut: the Matrix Helper Popup
When you open any Widget/HTML module with a custom widget, hover your mouse next to the Enlarge button and you’ll see a Helper Classes button. Clicking it will open a popup displaying the most common and useful classes.
From there, you can simply copy the class you need and paste it directly into your widget.
If the Helper Classes icon doesn’t appear, check your configuration settings in the <head> and ensure helperClasses: true is enabled.
helperClassesModule: true,
01. backgrounds
bg-transparent | The transparent background color |
bg-primary | The main accent background color |
bg-secondary | The secondary accent background color |
bg-primary-dark | The primary dark background color (footer) |
bg-secondary-dark | The secondary dark background color |
bg-white | White background color |
bg-dark | |
bg-turquoise | |
bg-emerald | |
bg-peter-river | |
bg-amethyst | |
bg-wet-asphalt | |
bg-green-sea | |
bg-nephritis | |
bg-belize-hole | |
bg-wisteria | |
bg-midnight-blue | |
bg-sun-flower | |
bg-carrot | |
bg-alizarin | |
bg-clouds | |
bg-concrete | |
bg-orange | |
bg-pumpkin | |
bg-pomegranate | |
bg-silver | |
bg-asbestos | |
bg-red | |
bg-blue | |
bg-green | |
bg-yellow | |
bg-pink | |
bg-purple | |
bg-amber | |
bg-lime | |
bg-brown | |
bg-teal | |
bg-cyan | |
bg-gray | |
bg-gradient | The gradient color of bg-primary and bg-secondary |
02. text color and link
color-dark | The headings and text color #000000 |
color-white | The headings and text color #ffffff |
link-white | The global link color #ffffff |
link-dark | The global link color #000000 |
link-grey | The global link color #cccccc |
has-dark-link | The text color in custom buttons (not hover) |
03. padding and margin
no-padding | padding:0px |
add-5 | padding:5px |
add-10 | padding:10px |
add-15 | padding:15px |
add-20 | padding:20px |
add-25 | padding:25px |
add-30 | padding:30px |
no-margin | margin:0 |
pull-top | margin-top:-15px |
pull-btm | margin-bottom:-15px |
04. alignment
hs-left | float:left |
hs-right | float:right |
hs-center | float:none |
text-left | text-align:left |
text-right | text-align:right |
text-center | text-align:center |
is--left | left-align (Flexbox) |
is--right | right-align (Flexbox) |
is--center | center-align (Flexbox) |
05. text size and font weight
size-11 | font-size:11px |
size-12 | font-size:12px |
size-13 | font-size:13px |
size-14 | font-size:14px |
size-15 | font-size:15px |
size-16 | font-size:16px |
size-17 | font-size:17px |
size-18 | font-size:18px |
size-19 | font-size:19px |
size-20 | font-size:20px |
size-25 | font-size:25px |
size-30 | font-size:30px |
weight-300 | font-weight:300 |
weight-400 | font-weight:400 |
weight-500 | font-weight:500 |
weight-600 | font-weight:600 |
weight-700 | font-weight:700 |
weight-800 | font-weight:800 |
06. position
rel | position:relative |
absolute-top-left | position:absolute;top:0;left:0; |
absolute-top-right | position:absolute;top:0;right:0; |
absolute-btm-left | position:absolute;bottom:0;left:0; |
absolute-btm-right | position:absolute;bottom:0;right:0; |
07. display desktop or mobile only
only-mobile | Display only for tablet and mobile |
only-mobile-phone | Display only for mobile |
hide-mobile | Display only for desktop |
hide-mobile-only | Display only for desktop and tablet |
08. grid columns
col-12 | width: 100% |
col-11 | width: 91.66666667% |
col-10 | width: 83.33333333% |
col-9 | width: 75% |
col-8 | width: 66.66666667% |
col-7 | width: 58.33333333% |
col-6 | width: 50% |
col-5 | width: 41.66666667% |
col-4 | width:33.33333333% |
col-3 | width:25% |
col-2 | width:16.66666667% |
col-1 | width:8.33333333% |
col-0 | width:auto |
09. buttons
mid-round | border-radius:5px; |
bg-round | border-radius:500px; |
ghost-dark | border:2px solid dark; |
ghost-white | border:2px solid white; |
fullwidth-btn | width:100% |
small-btn | padding: 12px 25px |
large-btn | padding: 15px 55px |