Using Attributes

You can also define the HTML attributes for NUI components using both the designer and code

In Designer

In the designer, you can set the attributes for a component as a key: value pair with one attribute per line.

Using Code

Adding Attributes

You can use the add_attribute method

The second argument is optional since some attributes don't require it

Removing Attributes

You can remove attributes using the remove_attribute method

Last updated