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.

You won't necessarily use every element listed below in a single . You can modify the list to suit the elements you are including in your .

Jig YAML order

  • Title
  • Description
  • Type
  • Icon
  • Badge
  • Inputs
  • Placeholders
  • onFocus/onRefresh
  • Expressions
  • header
  • actions
  • summary
  • datasources
  • children
  • preview
  • widgets
YAML order


Order of items in a section

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
section-order