Header
<zn-header> | ZnHeader
Short summary of the component’s intended use.
<div style="background-color: #f5f5f5; padding: 20px;"> <zn-header caption="John Jones" description="This is the Description of the header" previous-path="#" breadcrumb="[{"path":"#","title":"Dashboard"},{"path":"#","title":"Another"}]" navigation="[{"path":"#","title":"Dashboard"},{"path":"#","title":"Another"}]"> <zn-icon round src="test1@example.com" size="36"></zn-icon> </zn-header> </div>
Examples
Simple Header
<div style="background-color: #f5f5f5; padding: 20px;"> <zn-header caption="John Jones"></zn-header> </div>
Simple Header with description
<div style="background-color: #f5f5f5; padding: 20px;"> <zn-header caption="John Jones" description="This is the description of the header"></zn-header> </div>
Simple Header with actions
<div style="background-color: #f5f5f5; padding: 20px;"> <zn-header caption="John Jones" description="This is the description of the header"> <zn-button-menu slot="actions"> <zn-button primary>Something sdf</zn-button> <zn-button >sd</zn-button> <zn-button secondary>fdf</zn-button> <zn-button secondary>fsdsfdf</zn-button> <zn-button >fd</zn-button> <zn-button category="edit">fdsfdf</zn-button> <zn-button primary category="edit">d</zn-button> <zn-button secondary category="view">dfsf</zn-button> </zn-button-menu> </zn-header> </div>
Simple Header with expanding actions
This is the content here, this will probably be loaded from one of the URIs.
if count uri is set, use that to retrieve the number to display as a notification if prefetch is set, we need to lod the uri which should have the count with it.
This is the content here, this will probably be loaded from one of the URIs.
if count uri is set, use that to retrieve the number to display as a notification if prefetch is set, we need to lod the uri which should have the count with it.
<div style="background-color: #f5f5f5; padding: 20px;"> <zn-header caption="John Jones" description="This is the description of the header"> <zn-button-menu slot="actions"> <zn-button primary>Something sdf</zn-button> <zn-button >sd</zn-button> <zn-button secondary>fdf</zn-button> <zn-button secondary>fsdsfdf</zn-button> <zn-button >fd</zn-button> <zn-button category="edit">fdsfdf</zn-button> <zn-button primary category="edit">d</zn-button> <zn-button secondary category="view">dfsf</zn-button> </zn-button-menu> <zn-expanding-action icon="new_label" content-uri="/test" method="drop" slot="actions"> <p>This is the content here, this will probably be loaded from one of the URIs.</p> <p>if count uri is set, use that to retrieve the number to display as a notification if prefetch is set, we need to lod the uri which should have the count with it.</p> </zn-expanding-action> <zn-expanding-action icon="new_label" content-uri="/test" method="drop" slot="actions"> <p>This is the content here, this will probably be loaded from one of the URIs.</p> <p>if count uri is set, use that to retrieve the number to display as a notification if prefetch is set, we need to lod the uri which should have the count with it.</p> </zn-expanding-action> </zn-header> </div>
Importing
If you’re using the autoloader or the traditional loader, you can ignore this section. Otherwise, feel free to use any of the following snippets to cherry pick this component.
To import this component from the CDN using a script tag:
<script type="module" src="https://cdn.jsdelivr.net/npm/@kubex/zinc@1.0.0/dist/components/header/header.js"></script>
To import this component from the CDN using a JavaScript import:
import 'https://cdn.jsdelivr.net/npm/@kubex/zinc@1.0.0/dist/components/header/header.js';
To import this component using a bundler:
import '@kubex/zinc/dist/components/header/header.js';
Slots
Name | Description |
---|---|
(default) | The default slot. |
example
|
An example slot. |
Learn more about using slots.
Events
Name | React Event | Description | Event Detail |
---|---|---|---|
zn-event-name |
|
Emitted as an example. | - |
Learn more about events.
Custom Properties
Name | Description | Default |
---|---|---|
--example |
An example CSS custom property. |
Learn more about customizing CSS custom properties.
Parts
Name | Description |
---|---|
base |
The component’s base wrapper. |
Learn more about customizing CSS parts.
Dependencies
This component automatically imports the following dependencies.
<zn-example>