Skip to main content

Buttons

astroid-theming-button.png

๐ŸŽฏ Goalโ€‹

Create a single place to define button styles (primary, secondary, etc.), so you donโ€™t need to style buttons individually across your site.

This works similarly to a design system: define once โ†’ reuse everywhere. You can find Button settings in Template Options > Theming > Buttons.


๐Ÿงญ Step-by-step: Configure a centralized button systemโ€‹

๐Ÿ”น Step 1 โ€” Choose a Style (your โ€œnamed buttonโ€)โ€‹

Click on the "Add Item" button to add a new button item.

astroid-add-new-button.png

At the top: Choose a button style > Primary (you can create new items for other buttons)

๐Ÿ‘‰ This means: You are editing ALL .btn-primary buttons globally


๐Ÿ”น Step 2 โ€” Define Typographyโ€‹

Switch:

Typography โ†’ Custom

Set:

  • Font size (e.g. 16px)
  • Font weight (e.g. 500โ€“600)

๐Ÿ’ก Tip: Keep typography consistent across all button types


๐Ÿ”น Step 3 โ€” Set Padding (button size system)โ€‹

Example:

Top: 10px
Right: 20px
Bottom: 10px
Left: 20px

๐Ÿ‘‰ This defines:

  • Button size
  • Clickable area

๐Ÿ”น Step 4 โ€” Border & Shapeโ€‹

Border Styleโ€‹

  • Choose one of available options: None, solid, dashed, dotted, double.

Border Radiusโ€‹

  • Set the border radius for Start Start, Start End, End End, and End Start.

Example:

6px โ†’ modern
50px โ†’ pill button
0 โ†’ sharp edges

๐Ÿ”น Step 5 โ€” Define Colorsโ€‹

You have 2 tabs:

โœ… Normal stateโ€‹

Set:

  • Text Color
  • Background Color
  • Border Color

โœ… Hover state (click โ€œColor Hoverโ€)โ€‹

Set:

  • Hover background
  • Hover text color
  • Hover border

๐Ÿ‘‰ This is critical for UX


๐Ÿ”น Step 6 โ€” Light / Dark mode supportโ€‹

Each color has:

  • Light mode
  • Dark mode

๐Ÿ‘‰ If your site uses dark mode: you should define both, otherwise leave dark empty.


๐Ÿ”น Step 7 โ€” Click โ€œApply Changesโ€โ€‹

In the Top-right or bottom, you can see "Apply Changes" button, click on it to save the button style configurations then click save the template style.

๐Ÿ‘‰ This compiles dynamic CSS across your site. You can refer to this video tutorial: Video Reference


๐Ÿง  3. Build a REAL centralized systemโ€‹

Hereโ€™s how to structure it professionally:

StylePurposeExample
PrimaryMain CTABuy, Submit
SecondaryAlternativeCancel
OutlineMinimalLearn More
DangerRiskDelete

๐Ÿ”— 4. How to USE these centralized stylesโ€‹

In Astroid / SP Page Builderโ€‹

Choose:

Button Style โ†’ Primary

In HTMLโ€‹

<a class="btn btn-primary">Click</a>

๐Ÿ‘‰ These will automatically use your global settings.


Theming

Astroid Framework provides a powerful theming system that allows you to customize the look and feel of your Joomla template. You can easily change colors, fonts, and other visual elements to match your brand or personal style.

๐Ÿ“ Where to Start?โ€‹

  1. Log in to your Joomla Administrator Panel.
  2. Go to: System โ†’ Site Templates โ†’ Templates (Site).
  3. Click on the Astroid template you are using.
  4. Click the โ€œTemplate Optionsโ€ button.
  5. Go to the Theming tab.
  6. Here you can change the default colors and link them with the different areas of your website.
  7. Click the Save button to apply your changes.

Theming comes with 2 major features.

Select the default colors and link those colors with the default area of your website (i.e. primary, secondary and others).


๐ŸŒˆ Color Paletteโ€‹

Astroid Framework allows you to define a color palette for your template. This palette can be used throughout your site to maintain a consistent look and feel.

colors.jpeg

๐ŸŽจ Custom Colorsโ€‹

You can also define custom colors for specific elements of your template. This allows you to create unique styles for different sections of your site. The SASS Overrides system is the ability to override bootstrap SAAS variables. Assuming you know SAAS and want to override the default bootstrap variables. You can easily do so by modifying the variables in the backend itself.

Default Bootstrap SAAS variables can be found in the file JOOMLAROOT/media/astroid/assets/vendor/bootstrap/scss/_variables.scss

You can override it in your template (ex: astroid_template_two) in the file JOOMLAROOT/media/templates/site/astroid_template_two/scss/variable_overrides.scss

sass-overrides.jpeg