Building Apps with Jigx
...
UI
Jigs (screens)

Jig Templates

8min

 provides a template gallery that you can use as a base when creating solutions. templates are available when creating s, adding components and widgets to a .

Using templates has many benefits, such as:

  1. Time Efficiency: Templates provide a pre-designed structure and layout. They can save you time by eliminating the need to start from scratch or design every aspect from the ground up. With templates, you can jumpstart your development process and focus more on customizing the specific functionality you require.
  2. Consistency and Best Practices: Templates ensure consistency in your project. Using templates helps maintain a uniform structure, coding style, and user experience throughout your application.
  3. Reduced Development Effort: Templates include pre-built features and components that are commonly required when building s. By leveraging these pre-existing elements, you can reduce the effort needed to implement standard features, allowing you to allocate more time and resources to develop unique and critical features that differentiate your app.

While templates offer numerous benefits, it's important to remember that they may not always meet your requirements. Customization is still necessary, and templates should be used as a starting point rather than a complete solution.

Jig template
Jig template


Using jig templates



Jig templates either use Static Data or Dynamic Data. You can easily customize the template to use other datasources instead.

Each type has a set of templates to choose from. Follow the steps below to select a template.

  1. In Explorer in the jigs folder, right-click and create a new jig file with the .jigx extension. The IntelliSense popup displays listing the available types and the Use template option. Use ctrl+space to open the IntelliSense popup.
Jig template option
Jig template option

  1. Click Use template. The templates gallery opens providing the templates for all types. Use the Search and Category fields to find the template you want or browse the gallery by scrolling through the options.
  2. Once you have chosen a template, hover over the template, there are two options:

1. Insert

Template Insert jig
Template Insert jig

  1. Click the blue Insert button. The selected template YAML will be inserted into your file.
  2. Check the YAML code for comments that specify additional steps you must take on the template, such as #Create new table invoices in databases/default.jigx. Here you will manually need to add the table to the default.jigx file under the database folder.
  3. Add your name to the index.jigx file.
  4. Publish your project and view the in the app.
  5. Now you can customize the by changing the static data to dynamic data or adding additional components using the component templates described below.

2. Configure

Template Configure jig
Template Configure jig

  1. Click the blue Configure button.
  2. Next, choose the size of the widget that will display on the .
  3. Now choose the type of widget, for example, chart or avatar widget.
  4. The selected template YAML will be inserted into your file.
  5. Check the YAML code for comments that specify additional steps you must take on the template, such as #Create new table invoices in databases/default.jigx. Here, you will manually need to add the table to the default.jigx file under the database folder.
  6. ThejigId and size are automatically added to the index.jigx file with the size you selected in the template's widget screen configuration.
  7. Publish your solution and view the widget and in the app.
  8. Now you can customize the by changing the static data to dynamic data or adding additional components using the component templates described below.

Scenario templates

You can use the scenario templates to create a functioning solution. For example insert the Content management scenario template and publish out the solution to the app. The scenario includes four s and adds the contacts table.

Scenario templates
Scenario templates


See Also



Updated 19 Feb 2024
Doc contributor
Did this page help you?
Yes
No