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

Kernel Components

fastn comes with a few kernel components, these components are the building blocks for building all other components.
ℹ️
import
fastn supports importing one document from another, and the imported documents act as a namespace.
All kernel components are defined in a virtual document, named ftd, and every .ftd file implicitly imports ftd:
hello world using ftd.text
-- import: ftd

-- ftd.text: hello world
Lang:
ftd

The import line is not needed as it's automatically imported. This line defines namespace ftd, so all kernel components are referred as ftd.text and so on.

We are then using a component named ftd.text to render the text "hello world" in the UI.