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

Example

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

Where the font(s) you are using are not universally accepted fonts, they will need to be used in conjunction with the fonts array below.

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

"Universally accepted fonts" refers to identifying fonts that are widely supported across different operating systems and devices. These fonts are likely to be pre-installed on most computers and browsers, ensuring that your web content appears consistently to all users. They typically include fonts like Arial, Times New Roman, Courier New, Georgia, and Verdana, among others.

Example

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

Where the font you are using is a universally available standard font, you do not need to use the fonts array.

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.

Example

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

Last updated