/
Subscription
Legal
Manage account
Pricing
Custom Attributes
In KappaX, every layer has standard properties that you can use to define its appearance and behavior. However, to extend the functionality of the layers, you can define custom attributes that allow you to add dynamic values to the layer.
Types of Custom Attributes
There are four types of Custom Attributes in KappaX. These are of tyoe :
- String
- Number
- Color
- Image
Their values can be manipulated through logic. Let’s dive deeper into each of these types and understand how to use them.
Kappa Tip
Every custom attribute type empowers you to craft a more captivating project and make dynamic modifications that enhance personalization for your audience.
String-Type Attribute
String-type attributes can be used to dynamically display names & descriptions etc. To add a custom string attribute to a layer in KappaX, select the layer and go to the properties panel. Click on the “Add Attribute” button and give it a name and a default value. For example, let’s name it “CurrentOption” and set its default value to “none”.
To check the current value of this attribute, we can refer to it in dynamic text. This will display the current value of the attribute. If you are not sure how to use dynamic text, follow this link.
Now, let’s see how we can update the value of this attribute through logic. Select the layer and switch to the logic panel. Select the “Click” event and add an action to set the custom attribute to a new value, such as “Choco Donut”.
To see this in action, switch to the preview mode and select the layer with the custom attribute. You’ll see that the value of the attribute has been updated to “Choco Donut”.
Number-Type Attribute
Number-type attributes can be used in so many ways to keep a track of navigation, quizzes, polls and many more things.
Similar to a custom string attribute, you can also add a custom number attribute to a layer in KappaX. To do this, follow the same steps as before and set the attribute type to “Number”. You can then use the attribute in logic to perform calculations or manipulate its value.
Color-Type Attribute
You can update the background colors of shapes, images, videos, and texts using this attribute.
To add a custom color attribute to a layer, select the layer and add a custom attribute of type color. You can then assign a color to the attribute by clicking on the color picker.
To use this attribute in logic, switch to the logic panel and add an action to set the background color of a layer to the custom attribute. For example, you can set the background color of the “Selection screen” to the custom attribute “BG Color”.
Image-Type Attribute
The Image-type attribute is used to dynamically update the media of image layer via logic. To do this, select the layer and define a custom attribute of image type. You can then assign an image to the attribute by selecting an image from the list.
To use this attribute in logic, switch to the logic panel and add an action to set the image of a layer to the custom attribute. For example, you can set the image of a “Choco Donut” layer to the custom attribute “New Choco Img”.
Using these custom attributes, you can add dynamic functionality to your designs and create interfaces that are not only beautiful but also highly functional.