Properties

key

Unique key for this node

key?: string

context

Select props from context and add to context for this node

context?: (context: NodeContext) => NodeContext

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: (context: NodeContext) => boolean; }

spring

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

spring?: (context: NodeContext) => { [propertyName: string]: { value: number | null | undefined; transform?: (value: number) => number; config?: SpringOptions; }; }

children

Children of this node. Falsy children are automatically filtered out

children?: string | TemplateNode | TemplateNode[]