Menu Item
<zn-menu-item> | ZnMenuItem
Short summary of the component’s intended use.
<zn-menu-item></zn-menu-item>
Examples
First Example
TODO
Second Example
TODO
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/menu-item/menu-item.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/menu-item/menu-item.js';
To import this component using a bundler:
import '@kubex/zinc/dist/components/menu-item/menu-item.js';
Slots
Name | Description |
---|---|
(default) | The default slot. |
example
|
An example slot. |
Learn more about using slots.
Properties
Name | Description | Reflects | Type | Default |
---|---|---|---|---|
type
|
The type of menu item to render. To use checked , this value must be set to
checkbox .
|
'normal' | 'checkbox'
|
'normal'
|
|
checked
|
Draws the item in a checked state. |
|
boolean
|
false
|
value
|
A unique value to store in the menu item. This can be used as a way to identify menu items when selected. |
string
|
''
|
|
loading
|
Draws the menu item in a loading state. |
|
boolean
|
false
|
disabled
|
Draws the menu item in a disabled state, preventing selection. |
|
boolean
|
false
|
updateComplete |
A read-only promise that resolves when the component has finished updating. |
Learn more about attributes and properties.
Events
Name | React Event | Description | Event Detail |
---|---|---|---|
zn-event-name |
|
Emitted as an example. | - |
Learn more about events.
Methods
Name | Description | Arguments |
---|---|---|
getTextLabel() |
Returns a text label based on the contents of the menu item’s default slot. | - |
Learn more about methods.
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>