Skip to main content


The @slots decorator is used to mark a method of a NodeBlock that defines the slots for the block. Slots are used by the forms to store the collected data.

Decorator type

Method ℹ️

Applies to

Decorator signature


Decorated method signature

(slots: Slots): void

Decorated method parameters

slotsSlotsNoReference to the Slots instance that is used to define the slots for the block.

The Slots instance is also available using the slots property of a NodeBlock.


import { _, tripetto, slots, NodeBlock, Slots } from "@tripetto/builder";

type: "node",
identifier: "example-block",
label: "Example",
icon: "data:image/svg+xml;base64,PHN2ZyAvPg=="
class ExampleBlock extends NodeBlock {
onSlots(): void {
// Let's define a slot that holds a text value
type: Slots.Text,
reference: "value",
label: _("Example value")