NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in
ts
function CSSType(type: string): ClassDecorator;

Defined in: ui/core/view/index.d.ts:38

Specifies the type name for the instances of this View class, that is used when matching CSS type selectors.

Usage:

@CSSType("Button")
class Button extends View {
}

Internally the decorator set Button.prototype.cssType = "Button".

Parameters

ParameterTypeDescription
typestringThe type name, e. g. "Button", "Label", etc.

Returns

ClassDecorator

Previous
confirm