Properties

key

Unique key for this node

key?: string

data

Select props from data and add to data for child nodes

data?: false | ((currentData?: NodeData, currentContext?: NodeContext) => NodeData)

routes

Routes to listen to

routes?: { [event: string]: string; }

transition

Apply transition when toggled

transition?: { fn: (node: HTMLElement, options?: { duration?: number; easing?: (t: number) => number; }) => { duration: number; easing: (t: number) => number; tick: (t: number) => void; }; duration?: number; easing?: (t: number) => number; when: (currentData: NodeData) => boolean; }

spring

Automatically create springs for props, returned properties are added to context for this node

spring?: (currentData: NodeData) => { [propertyName: string]: NodeSpringProperty; }

children

Children of this node. Falsy children are automatically filtered out

children?: string | TemplateNode | TemplateNode[]

item

Single item node description to use for list based nodes

item?: TemplateNode