Decorator

interface Decorator : Mappable

A decorator attached to a field, column, or row. Renders as an icon and/or label that can trigger a custom action when tapped (in fill mode).

Note: At least one of icon or label must be present for the decorator to be visible in the UI. If both are missing, the decorator will still exist in the document model but will not be rendered.

Properties

Link copied to clipboard
abstract val action: String?

Custom event name emitted to the SDK consumer when the decorator is tapped.

Link copied to clipboard
abstract val color: String?

Optional hex color string (e.g. "#459842") for the decorator appearance.

Link copied to clipboard
abstract val icon: String?

Optional icon name (e.g. "add", "print") for Material Icons.

Link copied to clipboard
abstract val label: String?

Optional text label.

Functions

Link copied to clipboard
open fun copy(icon: String? = this.icon, label: String? = this.label, color: String? = this.color, action: String? = this.action): Decorator

Creates a copy of this decorator, optionally overriding specific properties.

Link copied to clipboard
open fun merge(other: Decorator): Decorator
Link copied to clipboard
abstract fun toJsonObject(): JsonObject

Serializes this instance to a structured JsonObject.

Link copied to clipboard
abstract fun toJsonString(): String

Serializes this instance to a compact JSON string.

Link copied to clipboard
abstract fun toMap(): MutableMap<String, Any?>

Converts this instance into a mutable key-value map suitable for mutation and re-serialization.