Building Apps with Jigx
Jigx Builder (code editor)
YAML order
4min
When it comes to ordering YAML elements, it's crucial to structure your file in a clear and logical manner. By doing so, you can ensure that your YAML data is easy to read, maintain, and troubleshoot, and sometimes, even the performance and order of execution are determined by the order.
Here are the best practices for ordering YAML elements in a file and the recommended structure for items in a section, for example, components.
- Title
- Description
- Type
- Icon
- Badge
- Inputs
- Placeholders
- onFocus/onRefresh
- Expressions
- header
- actions
- summary
- datasources
- children
- preview
- widgets
Order of items within a section, for example when defining a component we should aim to standardise as follows:
- Type is always the first thing to be defined so that we know what we are dealing with
- Meta elements for the list (data)
- Item definition
- Title
- Subtitle
- Description
- Left element , Right element , Label
- action
- OnPress
- Swipeable
Updated 05 Aug 2024
![Doc contributor](https://s3.amazonaws.com/archbee-animals/rabbit.png)
Did this page help you?