# Questions regarding style props and how they behave when they are nested

**URL:** <https://forum.inductiveautomation.com/t/questions-regarding-style-props-and-how-they-behave-when-they-are-nested/92195>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [June 21, 2024, 5:21am UTC](https://forum.inductiveautomation.com/t/questions-regarding-style-props-and-how-they-behave-when-they-are-nested/92195 "2024-06-21T05:21:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 21, 2024, 6:08am UTC](https://forum.inductiveautomation.com/t/questions-regarding-style-props-and-how-they-behave-when-they-are-nested/92195/2 "2024-06-21T06:08:23Z")

</div>

1. You need to use the `items` property [(Json-Schema Array Reference)](https://json-schema.org/understanding-json-schema/reference/array).

```json
// The multistate button schema probably looks something like this...
{
    "properties": {
        "states": {
            "type": "array",
            "items": {
                "type": "object",
                "default": {
                    "text": "",
                    "value": "",
                    "selectedStyle": {},
                    "unselectedStyle": {}
                },
                "properties": {
                    "text": {
                        "type": "string"
                    },
                    "value": {
                        "type": "string"
                    },
                    "selectedStyle": {
                        "$ref": "urn:ignition-schema:schemas/style-properties.schema.json"
                    },
                    "unselectedStyle": {
                        "$ref": "urn:ignition-schema:schemas/style-properties.schema.json"
                    }
                }
            }
        }
    }
}

```

1. The schema reference shouldn't be under `default`, but instead under the property definition. See #1.

2. I'm not sure what's possible with conditional styling. I've only played around with it enough to know it's kinda limited.

---

_[View the full topic](https://forum.inductiveautomation.com/t/questions-regarding-style-props-and-how-they-behave-when-they-are-nested/92195)._
