Button

Package name:
gsalunke.github.io/fastn-button

Export button inside ds.ftd document

If you’re using fastn buttons on all ftd files of a fastn project, then don’t import it inside every ftd file, just export it to FASTN/ds.ftd. For more information on export check out how fastn created their fastn.com - website ds document.

To use as export create fastn projects using their fastn-template which have ready to use FASTN/ds.ftd document.

If fastn project is created using FASTN/<filename>.ftd document, then its just a one line import of fastn button and export.

Fastn button will be available using -- ds.button: via FASTN/ds.ftd document see this code.

To create a fastn export alias add fastn button dependency inside FASTN.ftd:
-- fastn.dependency: gsalunke.github.io/fastn-button
Lang:
ftd

Exporting fastn-button

Import fastn-button inside FASTN/ds.ftd document:
-- import: gsalunke.github.io/fastn-button
export: button
Lang:
ftd

How to use button exported from FASTN/ds.ftd document

Once fastn-button is added inside FASTN/ds.ftd check whether ds alias is present inside FASTN.ftd, like this example

If ds alias is present, which is always present when [fastn-template] (https://github.com/fastn-stack/fastn-template) is used to create fastn projects. Then use below example usage, which shows usage of fastn-button using ds.button export:
-- ds.button: TEXT
variant: text
link: index.html
size: large

-- ds.button: Contained
variant: contained
link: index.html
size: large

-- ds.button: Outlined
variant: outlined
link: index.html
size: large
Lang:
ftd
Copyright © 2023 - Ganesh S Salunke