# j-Backup

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

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: d8597d14b01b327b11f32642eb89553c8a29254c5c9a74da9f303490f0248703
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

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.

```html 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>
```
