Skip to content

Templates

Flyter allows you to override the templates used internally, mostly used if you define a new theme.

keytypedescriptiondefault value
template.editstring*The edit markup which will contain the editing type and actions (buttons)See below
template.buttonsstring*The buttons markupSee below
template.readstring*The displayed value (when not triggered), as well as the loading containerSee below
template.loadingstring*The loading indicatorSee below

Here are the vanilla templates used. Please note that they have some data-flyter- attributes which are mandatory if you override those templates.

Edit

html
<div class="flyter-edit-container">
  <div data-flyter-edit>
    <!-- will contain the type markup -->
  </div>
  <div data-flyter-action>
    <!-- will contain the two buttons if enabled -->
  </div>
</div>

Buttons

html
<div class="flyter-buttons-container">
  <button data-flyter-submit><!-- contains okButton.text --></button>
  <button data-flyter-cancel><!-- contains cancelButton.text --></button>
</div>

Read

This template is used when flyter is not triggered, when not open in edition mode.

html
<div class="flyter-read-container">
  <span data-flyter-read><!-- contains the displayed value --></span>
  <div data-flyter-loading><!-- contains the loader --></div>
</div>

Loading

html
<div>Loading</div>