ForgeComponents
en

Components

j-Backup

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

The component for data saving data to and loading from the local storage of the browser.

  • supports dark mode

Configuration:

  • exec {String} Optional property which contains a link to a function, which will be executed after clicking on a button of the component. The function can have an argument, which is the name of a clicked button - function(name).
  • expire {String} Optional property, which specifies the period during which the data will be stored in the local storage. The default value is '1 day'. The value of the property should be written in the following format: "number [seconds, minutes, hours, days, weeks, months, years]"

Use it with <ui-component name="backup">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Kirill Zlobin. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="backup" path="userform" class="m"></ui-component>

<ui-plugin path="userform">
	<div class="row">
		<div class="col-xs-6 m">
			<ui-component name="input" path="?.firstname">First name</ui-component>
		</div>
		<div class="col-xs-6 m">
			<ui-component name="input" path="?.lastname">Last name</ui-component>
		</div>
	</div>
</ui-plugin>