# Trait

# Properties

# getId

Get the trait id.

Returns String (opens new window)

# getType

Get the trait type.

Returns String (opens new window)

# getName

Get the trait name.

Returns String (opens new window)

# getLabel

Get the trait label.

# Parameters

Returns String (opens new window)

# getValue

Get the trait value. The value is taken from component attributes by default or from properties if the trait has the changeProp enabled.

# Parameters

Returns any

# setValue

Update the trait value. The value is applied on component attributes by default or on properties if the trait has the changeProp enabled.

# Parameters

# getDefault

Get default value.

# getOptions

Get trait options.

Returns Array (opens new window)<TraitOption>

# getOption

Get current selected option or by id.

# Parameters

Returns (Object (opens new window) | null)

# getOptionId

Get the option id from the option object.

# Parameters

Returns String (opens new window) Option id

# getOptionLabel

Get option label.

# Parameters

Returns String (opens new window) Option label

# getCategoryLabel

Get category label.

# Parameters

Returns String (opens new window)

# runCommand

Run the trait command (used on the button trait type).