Skip to main content

label

Decorator that adds a label to a property in the inspector UI.

TypeNameInterface Description
Functionslabel(label: string): (target: any, key: string) => any

Function: Decorator that adds a label to a property in the inspector UI. This provides a human-readable name for the property field.

Parameters

label: - The display label text

Returns Property decorator function

Example

@component()
export class LightController extends APJS.BasicScriptComponent {
@serializeProperty()
@label("Light Color")
public color: APJS.Vector3f = new APJS.Vector3f(1, 1, 1);

@serializeProperty()
@label("Intensity (Lux)")
public intensity: number = 100;

@serializeProperty()
@label("Cast Shadows")
public castShadows: boolean = true;
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies