Customising the Design

Introduction

By default, the SparkLayer Frontend has relatively agnostic styling and tries to keep things as neutral as possible. In order to allow SparkLayer to be styled to match the theme and branding of the online store, a large selection of variables are exposed that can be customised via standard CSS methods.
Please note: If you're unable to style an element to your exact needs, please contact us and we'll be happy to advise.

Applying the customisations

The customisations work by adding a special snippet of CSS to the source code of your website that overwrites the default styling for SparkLayer. Please refer to our Integration Guide on how to do this.

Available customisations

The following list contains all available styles that can be updated on SparkLayer.

Colours

Sample CSS Code
1
<style>
2
:root {
3
/* Colours */
4
--spark-default-body-color: #555555;
5
--spark-primary-color: #000000;
6
--spark-primary-color-light: #F5F5F5;
7
--spark-primary-color-dark: #999999;
8
--spark-secondary-color: #125EF8;
9
--spark-tertiary-color: #00AF76;
10
--spark-lightest-color: #FFFFFF;
11
--spark-success-color: #00AF76;
12
--spark-error-color: #EF0000;
13
--spark-link-color: #125EF8;
14
--spark-input-color: #CCCCCC;
15
}
16
</style>
Copied!
Variable
Description & usage
Default Value
--spark-default-body-color
Body font colour
#555555
--spark-primary-color
Title font colour, e.g. price information
#000000
--spark-primary-color-light
Light shading, e.g. table shading
#F5F5F5
--spark-primary-color-dark
Dark shading
#999999
--spark-secondary-color
Secondary colour, e.g. a highlight colour
#125EF8
--spark-tertiary-color
Tertiary colour, e.g. large button colour
#00AF76
--spark-lightest-color
Lightest colour, e.g .white
#FFFFFF
--spark-success-color
Success message colour
#00AF76
--spark-error-color
Error message colour
#EF0000
--spark-warn-color
Warning message colour
#EDC35C
--spark-link-color
Anchor link colour
#125EF8
--spark-input-color
Form fields border colour
#CCCCCC

Typography

About embedded fonts

SparkLayer by default uses two typefaces on the Frontend
It's possible to overwrite these using the variables listed below. If you do require custom fonts for SparkLayer (e.g. using Google Fonts), please ensure these are included in your website's core CSS file and including in your site header if necessary.
Sample CSS Code
1
<style>
2
:root {
3
/* Typography */
4
--spark-font-default: 'Roboto', sans-serif;
5
--spark-font-highlight: 'Poppins', sans-serif;
6
--spark-font-weight-default: 400;
7
--spark-font-weight-light: 300;
8
--spark-font-weight-medium: 500;
9
--spark-font-weight-heavy: 600;
10
--spark-header-font: 'Poppins', sans-serif;
11
--spark-header-font-weight: 500;
12
--spark-h1-fontsize: 24px;
13
--spark-h2-fontsize: 22px;
14
--spark-h3-fontsize: 20px;
15
--spark-h4-fontsize: 16px;
16
--spark-h5-fontsize: 15px;
17
--spark-h6-fontsize: 14px;
18
--spark-pricing-fontsize: 16px;
19
--spark-pricing-font-weight: 400;
20
--spark-pricing-fontsize-small: 14px;
21
--spark-packsize-fontsize: 16px;
22
--spark-packsize-font-weight: 400;
23
--spark-packsize-fontsize-small: 14px;
24
--spark-product-code-fontsize: 16px;
25
--spark-product-code-font-weight: 400;
26
--spark-product-code-fontsize-small: 14px;
27
--spark-product-stockstatus-fontsize: 16px;
28
--spark-product-stockstatus-fontsize-small: 14px;
29
--spark-product-stockstatus-align: flex-start;
30
--spark-product-stockstatus-back-order-display: flex;
31
}
32
</style>
Copied!
Variable
Description
Default Value
--spark-font-default
Main body font
'Roboto', sans-serif
--spark-font-highlight
Highlight font
'Poppins', sans-serif
--spark-font-weight-default
Default font weight
400
--spark-font-weight-light
Light font weight
300
--spark-font-weight-medium
Medium font weight
500
--spark-font-weight-heavy
Heavy font weight
600
--spark-header-font
Header font
'Poppins', sans-serif
--spark-header-font-weight
Header font weight
500
--spark-h1-fontsize
H1 font size
24px
--spark-h2-fontsize
H2 font size
22px
--spark-h3-fontsize
H3 font size
20px
--spark-h4-fontsize
H4 font size
16px
--spark-h5-fontsize
H5 font size
15px
--spark-h6-fontsize
H6 font size
14px
--spark-pricing-fontsize
Pricing font size
16px
--spark-pricing-font-weight
Price font weight
500
--spark-pricing-fontsize-small
Price font size on mobile
14px
--spark-packsize-font-weight
Pack sizing font size
16px
--spark-packsize-fontsize
Pack sizing font weight
400

Buttons

General

Sample CSS Code
1
<style>
2
:root {
3
/* Buttons */
4
--spark-button-font-family: 'Poppins', sans-serif;
5
--spark-button-border: 0;
6
--spark-button-font-size: 15px;
7
--spark-button-font-weight: 400;
8
--spark-button-padding: 0.875em 1.75em;
9
--spark-button-radius: 4px;
10
--spark-button-text-transform: none;
11
--spark-button-text-letter-spacing: 0;
12
--spark-button-raised-background: #25EF8;
13
--spark-button-raised-background-hover: #508AFF;
14
--spark-button-raised-color: #FFFFFF;
15
}
16
</style>
Copied!
Variable
Description
Default Value
--spark-button-font-family
Button font
'Poppins', sans-serif
--spark-button-border
Button border
0
--spark-button-font-size
Button font size
15px
--spark-button-font-weight
Button font weight
400
--spark-button-padding
Button padding
0.875em 1.75em
--spark-button-radius
Button border radius
4px
--spark-button-text-transform
Button text transform
none
--spark-button-text-letter-spacing
Button letter spacing
0
--spark-button-raised-background
Button background
#25EF8
--spark-button-raised-background-hover
Button background hover
#508AFF
--spark-button-raised-color
Button font colour
#FFFFFF

Disabled buttons

Sample CSS Code
1
<style>
2
:root {
3
/* Disabeld buttons */
4
--spark-button-disabled-background: #DFDFDF;
5
--spark-button-disabled-color: #9F9F9F;
6
}
7
</style>
Copied!
Variable
Description
Default Value
--spark-button-disabled-background
Disabled button background
#DFDFDF
--spark-button-disabled-color
Disabled button font colour
#9F9F9F

Large buttons

Sample CSS Code
1
<style>
2
:root {
3
/* Large buttons */
4
--spark-button-large-font-size: 18px;
5
--spark-button-large-padding: 0.875em 1.75em;
6
--spark-button-large-background: #25EF8;
7
--spark-button-large-background: #508AFF;
8
}
9
</style>
Copied!
Variable
Description
Default Value
--spark-button-large-font-size
Large button font size
18px
--spark-button-large-padding
Large button padding
0.875em 1.75em
--spark-button-large-background
Large button background
#25EF8
--spark-button-large-background
Large button background hover
#508AFF

Messages

Toast notifications

Sample CSS Code
1
<style>
2
:root {
3
/* Toast notifications */
4
--spark-toast-color: #FFFFFF;
5
--spark-toast-text-color: #000000;
6
--spark-toast-action-color: #125EF8;
7
--spark-toast-border-color: #DDDDDD;
8
--spark-toast-border-radius: 4px;
9
}
10
</style>
Copied!
Variable
Description
Default Value
--spark-toast-color
Toast notification background colour
#FFFFFF
--spark-toast-text-color
Toast notification text colour
#000000
--spark-toast-action-color
Toast notification link colour
#125EF8
--spark-toast-border-color
Toast notification border colour
#DDDDDD
--spark-toast-border-radius
Toast notificaiton border radius
4px

General messages

Sample CSS Code
1
<style>
2
:root {
3
/* General messages */
4
--spark-message-padding: 0.7em 1.25em;
5
--spark-message-success-background: #E5FFF5;
6
--spark-message-success-border: 1px solid #1c9665;
7
--spark-message-warn-background: #FDF7E3;
8
--spark-message-warn-border: 1px solid #EDC35C;
9
--spark-message-error-background: #E74148;
10
--spark-message-error-border: 1px solid #E74148;
11
}
12
</style>
Copied!
Variable
Description
Default Value
--spark-message-padding
Message box padding
0.7em 1.25em
--spark-message-success-background
Message success background
#E5FFF5
--spark-message-success-border
Message success border
1px solid #1c9665
--spark-message-warn-background
Message warn background
#FDF7E3
--spark-message-warn-border
Message warn border
1px solid #EDC35C
--spark-message-error-background
Message error background
#E74148
--spark-message-error-border
Message error border
1px solid #E74148

General

Sample CSS Code
1
<style>
2
:root {
3
/* General */
4
--spark-border-radius-default: 4px;
5
--spark-border-radius-large: 8px;
6
--spark-drawer-max-width: 700px;
7
--spark-drawer-max-width-wide: 1000px;
8
--spark-loading-background-color: #DEDEDE;
9
--spark-loading-background-overlay-product: 255, 255, 255;
10
--spark-container-content-top: 3em;
11
--spark-container-content-bottom: 3em;
12
--spark-container-content-side: 4.5em;
13
--spark-container-content-reduced: 1.5em;
14
--spark-spinner-default-color: #125EF8;
15
}
16
</style>
Copied!
Variable
Description
Default Value
--spark-border-radius-default
Default border radius
4px
--spark-border-radius-large
Overlay border radius
8px
--spark-drawer-max-width
Width of overlay
700px
--spark-drawer-max-width-wide
Width of overlay in 'maximised' view
1000px
--spark-loading-background-color
Loading 'skeleton' colour
#DEDEDE
--spark-loading-background-overlay-product
Loading overlay colour on product pages
255,255,255
--spark-container-content-top
Overlay spacing - top
3em
--spark-container-content-bottom
Overlay spacing - bottom
3em
--spark-container-content-side
Overlay spacing - sides
4.5em
--spark-container-content-reduced
Overlay spacing - reduced
1.5em
--spark-spinner-default-color
Loading spinner colour
#125EF8

Forms

Input fields

Sample CSS Code
1
<style>
2
:root {
3
/* Input fields */
4
--spark-form-field-text-transform: none;
5
--spark-placeholder-text-color: #999999;
6
--spark-input-border-color: #CCCCCC;
7
--spark-input-border: 1px solid #CCCCCC;
8
--spark-input-radius: 4px;
9
--spark-input-background: #FFFFFF;
10
--spark-input-error-color: #EF0000;
11
--spark-input-success-color: #00AF76;
12
--spark-input-focus-color: #125EF8;
13
--spark-input-font-size: 14px;
14
--spark-input-margin: 0;
15
--spark-input-padding: 0.75em;
16
--spark-label-font-size: 0.8em;
17
--spark-input-disabled-color: #777777;
18
--spark-input-disabled-solid-color: #949494;
19
}
20
</style>
Copied!
Variable
Description
Default Value
--spark-form-field-text-transform
Form font text transform
none
--spark-placeholder-text-color
Input field placeholder colour
#999999
--spark-input-border-color
Input field border colour
#CCCCCC
--spark-input-border
Input field border
1px solid #CCCCCC
--spark-input-radius
Input field border radius
4px
--spark-input-background
Input field background
#FFFFFF
--spark-input-error-color
Input field error colour
#EF0000
--spark-input-success-color
Input field success colour
#00AF76
--spark-input-focus-color
Input field focus colour
#125EF8
--spark-input-font-size
Input field font size
14px
--spark-input-margin
Input field margin
0
--spark-input-padding
Input field padding
0.75em
--spark-label-font-size
Label font size
0.8em
--spark-input-disabled-color
Disabled input field colour
#777777
--spark-input-disabled-solid-color
Disabled input border colour
#949494

Radio buttons

Sample CSS Code
1
<style>
2
:root {
3
/* Radio buttons */
4
--spark-radio-fill-color: #125EF8;
5
--spark-radio-empty-color: #5A5A5A;
6
--spark-radio-border: 2px solid #125EF8;
7
}
8
</style>
Copied!
Variable
Description
Default Value
--spark-radio-fill-color
Radio button selected colour
#125EF8
--spark-radio-empty-color
Radio button unselected colour
#5A5A5A
--spark-radio-border
Radio button border
2px solid #125EF8

Select menus

Sample CSS Code
1
<style>
2
:root {
3
/* Select menus */
4
--spark-select-border: 1px solid #CCCCCC;
5
--spark-select-background: #FFFFFF;
6
--spark-select-focus: 1px solid #125EF8;
7
--spark-select-font-size: 14px;
8
--spark-select-padding: 0.75em;
9
--spark-select-radius: 4px;
10
--spark-select-disabled-color: #999999;
11
}
12
</style>
Copied!
Variable
Description
Default Value
--spark-select-border
Select menu border
1px solid #CCCCCC
--spark-select-background
Select menu background
#FFFFFF
--spark-select-focus
Select menu focus border colour
#125EF8
--spark-select-font-size
Select menu font size
14px
--spark-select-padding
Select menu padding
0.75em
--spark-select-radius
Select menu border radius
4px
--spark-select-disabled-color
Select menu disabled colour
#999999

Tables

Sample CSS Code
1
<style>
2
:root {
3
/* Tables */
4
--spark-table-border-color: #CCCCCC;
5
--spark-table-striped-color: #F5F5F5;
6
--spark-table-header-background-color: #FFFFFF;
7
--spark-table-header-text-color: #555555;
8
--spark-table-header-font-weight: 500;
9
}
10
</style>
Copied!
Variable
Description
Default Value
--spark-table-border-color
Table border colour
#CCCCCC
--spark-table-striped-color
Table striped rows background
#F5F5F5
--spark-table-header-background-color
Table header background
#FFFFFF
--spark-table-header-text-color
Table header text colour
#555555
--spark-table-header-font-weight
Table header font weight
500

Product Card

Sample CSS Code
1
<style>
2
:root {
3
/* Product Card */
4
--spark-product-card-button-radius: 4px;
5
--spark-product-card-button-padding: 0.75em 1em;
6
--spark-product-card-pricing-font-size: 15px;
7
--spark-product-card-pricing-font-size-small: 14px;
8
--spark-product-card-select-min-height: 50px;
9
10
--spark-product-card-stockstatus-fontsize: 16px;
11
--spark-product-card-stockstatus-fontsize-small: 14px;
12
--spark-product-card-stockstatus-align: center;
13
--spark-product-stockstatus-back-order-display: none;
14
15
--spark-product-card-tiered-pricing-display: flex;
16
--spark-product-card-tiered-pricing-font-size: 12px;
17
18
}
19
</style>
Copied!
Variable
Description
Default Value
--spark-product-card-button-radius
Button radius
4px
--spark-product-card-button-padding
Button padding
0.75em 1em
--spark-product-card-pricing-font-size
Pricing font size
15px
--spark-product-card-pricing-font-size-small
Pricing font size on mobile
14px
--spark-product-card-select-min-height
Minimum height for select menu wrapper
50px
--spark-product-card-tiered-pricing-display
Display of tiered pricing widget
flex
--spark-product-card-stockstatus-fontsize:
Stock status font size
16px
--spark-product-card-stockstatus-fontsize-small
Stock status font size on mobile
14px
--spark-product-card-stockstatus-align
Stock status alignment
center
--spark-product-card-tiered-pricing-display
Tiered pricing info display
flex (use none to hide)
--spark-product-card-tiered-pricing-font-size
Tiered pricing font size
12px

Product Detail Page

It's possible to hide specific content within the SparkLayer interface that is loaded on a product detail page. This is done by setting specific CSS variables within your CSS code.

Hiding the image in the table view

Adding the CSS below will hide the thumbnail image from showing
Sample CSS
1
<style>
2
:root {
3
/* Default */
4
--spark-pdp-image: table-cell;
5
6
/* Hide image */
7
--spark-pdp-image: none;
8
}
9
</style>
Copied!

Hiding the product code

Adding the CSS below will hide the product code from showing
Sample CSS
1
<style>
2
:root {
3
/* Default */
4
--spark-pdp-sku: block;
5
6
/* Hide image */
7
--spark-pdp-sku: none;
8
}
9
</style>
Copied!

Dark mode

If your Shopify store theme is set up to use a dark theme, you can enable a special 'Dark Mode' in SparkLayer. Within your SparkLayer core script, simply add the following within the code display: {darkTheme:true},
SparkLayer Core Script
1
<script>
2
window.sparkOptions = {
3
....
4
platform: "shopify",
5
display: {darkTheme:true},
6
auth: {
7
user: {{ customer.email | json }},
8
token: {{ customer.metafields.sparklayer.authentication | json }},
9
},
10
};
11
........
12
</script>
Copied!
Variable
Description
Default Value
--spark-dark-mode-lightest-color,
Default font colour
#ffffff
--spark-dark-mode-status-in-stock
In stock colour
#5ecfad
--spark-dark-mode-status-back-order
Backorder colour
#96b1ef
--spark-dark-mode-status-out-of-stock
Out of stock colour
#ff9a9a
--spark-dark-mode-table-border-color
Table border colour
#555
--spark-dark-mode-table-header-background
Table header colour
#000
--spark-dark-mode-table-row-background
Table row colour
#333
--spark-dark-mode-table-row-alt-background
Table alternate row colour
#222
--spark-dark-mode-qty-background
Quantity box colour
#000
--spark-dark-mode-qty-background-hover
Quantity box hover colour
#222
--spark-dark-mode-qty-border-color
Quantity box border colour
#555

JavaScript SDK

If you're looking to create a more bespoke design and layout using SparkLayer, we've made this possible via a dedicated JavaScript SDK. The SDK allows you to fully customise how the SparkLayer interacts on the product pages and you can even use it to trigger specific events such as adding items to an order.
If you're interested in using the SparkLayer JavaScript SDK, please contact our team and we'll be happy to walk you through it.