Developing custom themes

Last updated:

You can use the Formcentric Theme Customisation Workspace to design your own themes. This workspace has been specially developed for modifying Formcentric themes. In the workspace, you can modify existing Formcentric themes or create your own theme. By changing theme variables and using functionality such as SCSS partials and JavaScript templates, you can modify the design, markup and styling of your forms to meet your requirements. You also have the option of creating your own custom themes, adding fonts and images, and exporting your modifications for various target environments.

Workspace setup

To start work on developing your own theme, first clone the Formcentric Theme Customisation Workspace with the following command:


We recommend forking the workspace so that you will be able to enjoy all of the benefits of git during development and can set up deployments for your themes using github actions. To do this, consult the corresponding github documentation .

Documentation

Important general parts of a theme include:

  1. definition.json for cloud and design definitions
  2. styles.scss as a core style entry
  3. templateEntry.js as an entry for template bundling
  4. _variables.json for runtime variables in non-SCSS integration projects
  5. variables/_variables.scss for SCSS-based theme integration projects


Second-generation themes also work with a token-based design system. This simplifies the following:

  1. Consistent colour and spacing systems
  2. Centralised token maintenance
  3. Variant creation
  4. Long-term maintainability

Feedback