# j-SplashScreen

> A splash screen for single page applications. The body has to be wrapped into the <script type='text/html'>HTML</script> tag. The component will be destroyed automatically.

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

A splash screen for single page applications. The body has to be wrapped into the `<script type="text/html">HTML</script>` tag. The component will be destroyed automatically.

__Configuration__:

- `timeout` a timeout in milliseconds for destroying the splash screen (default: `3000`)
- `autoremove:true {Boolean}` automatically removes component.
- `remember {String}` e.g. `1 day` or `1 week` - it doesn't show a splash screen (default: `empty` = disabled)

__Methods__:

- `component.show([body])` will show splashscreen with a new or old body (`autoremove` must be `false`)

Use it with `<ui-component name="splashscreen">`. 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: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<style>
	html,body { height: 100%; overflow: hidden; padding: 0; margin: 0; }
	body { background-color: #F0F0F0; }
</style>

<ui-component name="splashscreen" class="ui-splashscreen">
	<script type="text/html">
		<div><img src="https://www.totaljs.com/download/B20200120T000000011.png" alt="Total.js Framework" border="0" /></div>
		<br />
		<p>Total.js framework is a server-side framework for Node.js<br /><b>Better than sex</b></p>
	</script>
</ui-component>

<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
```
