Skip to content

Styling the Live Timetables

The Live Timetables offer customisable fonts and colours, enabling you to align their appearance with your website’s branding for a seamless visitor experience.

The customStyle object

Variable / FieldField FunctionExample value
button.color

Controls the text colour of the day/date selector when it is selected.

NB when the day/date selector is not selected, the text colour will be black.

#FF0000
button.backgroundColorControls the colour of the day/date selector when it is selected and both of the booking buttons#008000
hover.colorControls the text colour of the time/date selector and both booking buttons when you hover over them#ffff00

button.fontFamily

Controls the font style for the day/date selector and both booking buttonsLato, sans-serif
filter.fontFamilyControls the font style for the time and activity filtersRoboto

base.fontFamily

Controls the font style for the text in the timetable rowsNoto Sans Khojki

Example

customStyle: {
button: {
color: '#FF0000',
backgroundColor: '#008000',
':hover': {
color: '#ffff00',
},
fontFamily: 'Lato, sans-serif',
},
filter: {
fontFamily: 'Roboto',
},
base: {
fontFamily: 'Noto Sans Khojki',
},
},

The fonts array

Where the font(s) you are using are not universally available standard fonts, you will need to include a an external link to reference the relevant services/repositories being used to source web fonts, e.g. Google Fonts

Example

fonts: [
{
cssSrc: 'https://fonts.googleapis.com/css?family=Roboto:300,400,700:latin',
},
{
cssSrc: 'https://fonts.googleapis.com/css2?family=Noto+Sans+Khojki',
},
],

customStyleForStyledComponents object

By default:

  • Odd rows in the timetable match the background color of the page it’s on. For example, if the page background is black, these rows will be black too.
  • Even rows are grey, providing contrast regardless of the page background.

The customStyleForStyledComponents object is handy for pages with non-white backgrounds, allowing you to manually set odd rows to white or any color you prefer, preventing them from blending into the page background. You also have the flexibility to customize colors for both odd and even rows as needed.

Variable / FieldField FunctionExample value
gridRow.oddControls the colour of the odd timetable rows#800080
gridRow.evenControls the colour of the even timetable rows#ffc0cb

Example

customStyleForStyledComponents: {
gridRow: {
odd: {
backgroundColor:'#800080',
},
even: {
backgroundColor:'#ffc0cb',
},
},
},