Want to try fastn for your company's website?
Book a Demo

Built-in Variables

fastn comes with some built-in variables, they are documented here.

ftd.dark-mode

Type
boolean
ftd.dark-mode tells you if the UI should show dark or light mode. To change the system preference use the built in functions.

ftd.system-dark-mode

Type
boolean
This variable tells if the system prefers dark or light mode. ftd.dark-mode may not be equal to ftd.system-dark-mode if ftd.follow-system-dark-mode is false.

ftd.follow-system-dark-mode

Type
boolean
This variable tells if the user prefers the UI to follow system dark mode preferences of if the user prefers to set this value.

ftd.device

Type
string
This value is either mobile or desktop. ftd.device is automatically updated when the browser resizes and device width crosses ftd.mobile-breakpoint and ftd.desktop-breakpoint thresholds.

ftd.mobile-breakpoint

Type
integer
Default Value
768
ftd.mobile-breakpoint is the width in pixels below which fastn assumes that the device is a mobile device, and sets ftd.device to mobile.