# j-NavLayout

> A simple and fully responsive navigation layout.

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

A simple and fully responsive navigation layout.


__Good to know__:

- `path {Boolean}` shows the navigation panel in display modes defined in the `hide` config option
- `<section>` must contain a navigation
- `<main>` must contain a content

__Configuration__:

- `width {Number}` a size of navigation (default: `250`)
- `hide {String}` hides navigation in defined display modes (default: `xs,sm`)
- `autoresize {Boolean}` enables auto-resizing (default: `true`)
- `position {String}` navigation position (default: `left`)
- `margin {Number}` adds margin for `height` (default: `0`)
- `parent {String}` can contain `parent`, `window` or jQuery selector for the `closest` method (default: `window`)

Use it with `<ui-component name="navlayout">`. 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 { margin: 0; padding: 0; }
</style>

<ui-component name="navlayout" path="common.menu" config="parent:window;hide:xs" class="invisible">

	<section style="background-color:blue;color:#FFF">
		Navigation
	</section>

	<main style="background-color:red;color:#FFF">
		Main body
	</main>

</ui-component>

<script>

	var common = { menu: false };

	setInterval(function() {
		var path = 'common.menu';
		SET(path, !GET(path));
	}, 3000);

</script>
```
