Zywave User Interface (ZUI) Snippets
This is a preview extension for Visual Studio Code adds snippets for zui-components in HTML in .vue files.
ZUI
Since ZUI doesn't directly support vue, you will need to use events instead of v-model
,
these snippets will guide you in the right direction to setting up components quicker.
That being said, you will probably still need to reference the ZUI repo
at some point during your development if you're utilizing ZUI.
Usage
Basic
After installation, it is as simple as typing the component you are about to use,
i.e. <zui-button
or zui-button
and pressing TAB or ENTER. This will auto generate
your code in HTML along with possible bindings or classes that you can apply to the
component you just generated.
Larger components
Sometimes, when you generate a larger, wrapper component, this will generate more
inner components just to show you its full capabilities. For example, generating
a <zui-radio-group>
will generate sub <zui-radio>
s. Give <zui-shell>
a go
and you'll see this example in full effect.
Component variants
You can also generate variants of components that will include certain attributes,
bindings, or components that wouldn't be normally included with that component.
<button:icon-left>
, for example, generates with a <zui-icon>
properly placed
for the icon to be placed in the left slot of the button.
Snippet Index
What's the prefix? The prefix is what VSCode is looking for you to type. When you start
typing in HTML in a vue file, VSCode uses these prefixes to determine what it suggests to
you.
Prefix(es) |
Base Component |
Notes |
<zui-button zui-button |
zui-button |
|
<zui-button:disabled zui-button:disabled |
zui-button |
Disabled ZUI button |
<zui-button:icon-right zui-button:icon-right |
zui-button |
ZUI button with icon on the right |
<zui-button:icon-left zui-button:icon-left |
zui-button |
ZUI button with icon on the left |
<zui-button:icon-only zui-button:icon-only |
zui-button |
ZUI button with only an icon |
<zui-button:svg zui-button:svg |
zui-button |
ZUI button with only an SVG |
<zui-card zui-card |
zui-card |
Includes header and footer |
<zui-icon zui-icon |
zui-icon |
Includes all selectable icon types |
<zui-checkbox zui-checkbox |
zui-checkbox |
|
<zui-checkbox:gallery zui-checkbox:gallery |
zui-checkbox |
Gallery styled ZUI checkbox setup |
<zui-dialog zui-dialog |
zui-dialog |
ZUI dialog with available classes, header, content and footer |
<zui-pager zui-pager |
zui-pager |
|
<zui-pages zui-pages |
zui-pages |
|
<zui-radio zui-radio |
zui-radio |
|
<zui-radio-group zui-radio-group |
zui-radio-group |
Includes a radio button |
<zui-radio-group:boolean zui-radio-group:boolean |
zui-radio-group |
A full setup of zui-radio-group when binding boolean values |
<zui-shell zui-shell |
zui-shell |
An attempt at an entire zui-shell setup |
<zui-shell-nav zui-shell-nav |
zui-shell-nav |
Includes inner shell components |
<zui-shell-nav-item zui-shell-nav-item |
zui-shell-nav-item |
|
<zui-shell-nav-item:subnav zui-shell-nav-item:subnav |
zui-shell-nav |
Subnav menu setup |
<zui-search zui-search |
zui-search |
|
<zui-spinner zui-spinner |
zui-spinner |
|
<zui-spinner-overlay zui-spinner-overlay |
zui-spinner-overlay |
|
<zui-tab zui-tab |
zui-tab |
|
<zui-tabs zui-tabs |
zui-tabs |
Full tabs setup includes single tab |