Built-in Variables

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

Contents

- [ftd.dark-mode](/built-in-variables/#ftd-dark-mode) - [ftd.system-dark-mode](/built-in-variables/#ftd-system-dark-mode) - [ftd.follow-system-dark-mode](/built-in-variables/#ftd-follow-system-dark-mode) - [ftd.device](/built-in-variables/#ftd-device) - [ftd.mobile-breakpoint](/built-in-variables/#ftd-mobile-breakpoint)

`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`.

Support `fastn`!

Enjoying `fastn`? Please consider giving us a star ⭐️ on [GitHub](https://github.com/fastn-stack/fastn) to show your support!
[⭐️](https://github.com/fastn-stack/fastn)

Getting Help

Have a question or need help? Visit our [GitHub Q&A discussion](https://github.com/fastn-stack/fastn/discussions/categories/q-a) to get answers and subscribe to it to stay tuned. Join our [Discord](https://discord.gg/a7eBUeutWD) channel and share your thoughts, suggestion, question etc. Connect with our [community](/community/)!
[💻️](/community/)

Found an issue?

If you find some issue, please visit our [GitHub issues](https://github.com/fastn-stack/fastn/issues) to tell us about it.

Quick links:

- [Install `fastn`](install/) - [Create `fastn` package](create-fastn-package/) - [Expander Crash Course](expander/) - [Syntax Highlighting in Sublime Text](/sublime/)

Join us

We welcome you to join our [Discord](https://discord.gg/a7eBUeutWD) community today. We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.
Copyright © 2023 - [FifthTry.com](https://www.fifthtry.com/)