ftd.rive - Rive Animations

ftd.rive is a kernel component used to render Rive animation in a fastn document.
Hello Rive!
-- import: fastn.com/assets

-- ftd.rive:
id: panda
background.solid: #aaa
src: $assets.files.rive.panda.riv
width.fixed.px: 400
ftd.rive accepts all the common attributes, and the ones listed below.


Type: Required string

The unique id used to identify this rive object. This id is used in communication with the Rive state machine.


Type: Required string

This is URL of riv file to load. It is recommended you store the riv file as part of your fastn package and use the auto generated assets module to refer to them.


Type: string list

It accepts the name or list of names of Rive state machines to load.


Type: boolean default: true

If set true, the animation will automatically start playing when loaded.


Type: optional string

It accepts the name of the rive artboard to use.

Rive functions

fastn language has various rive related built-in functions. These functions help to interact with rive on various events.
Sample code
-- ftd.rive:
id: fastn
src: $fastn-assets.files.assets.fastn.riv
width.fixed.px: 440
state-machine: Together
$on-mouse-enter$: $ftd.set-rive-boolean(rive = fastn, input = play, value = true)
$on-mouse-leave$: $ftd.set-rive-boolean(rive = fastn, input = play, value = false)

Rive Events

fastn language has various rive related events. These events can be attached to rive component. They fire the callback when any event occurs in rive component.

Support fastn!

Enjoying fastn? Please consider giving us a star ⭐️ on GitHub to show your support!

Getting Help

Have a question or need help?

Visit our GitHub Q&A discussion to get answers and subscribe to it to stay tuned.

Join our Discord channel and share your thoughts, suggestion, question etc.

Connect with our community!

Found an issue?

If you find some issue, please visit our GitHub issues to tell us about it.

Join us

We welcome you to join our Discord 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