0.0.16 • Published 4 months ago

@noveo/web-components v0.0.16

Weekly downloads
14
License
MIT
Repository
-
Last release
4 months ago

Noveo Web Components

Web Components was designed using Noveo UI Kit and built on Stencil

Documentation is available in Storybook: http://components.noveogroup.com

To run storybook locally, use serve

cd dist/storybook-static

serve

How to use

To use web-components on React application, it is necessary to use special components for React: Noveo React Components

Because React supports web-components only for 71%: React web-components support

React

If you want to use these components with React please consider using this package instead

Vue

Add this to your main Vue file to load components and mark them safe so compiler won't complain about not knowing what these components are:

import { defineCustomElements } from '@noveo/web-components/dist/loader';
Vue.config.ignoredElements = [/nv-\w*/];

defineCustomElements(window);

Angular

Add this to your main Angular file to load components:

import { defineCustomElements } from '@noveo/web-components/dist/loader';

defineCustomElements(window);

Add this to allow Angular modules contain non-angular custom elements:

import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

@NgModule({
  ...
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule { }

Installation

By npm:

npm install @noveo/web-components --save

Or by yarn:

yarn add @noveo/web-components

IMPORTANT! Almost all Noveo components depend on the nv-icon component to render icons, so make sure to follow the instructions for that component before using the others!

Usage

import { defineCustomElements } from '@noveo/web-components/dist/loader';

defineCustomElements(window);

To support Edge and IE11:

import {
  applyPolyfills,
  defineCustomElements
} from '@noveo/web-components/dist/loader';

applyPolyfills().then(() => defineCustomElements(window));

After defineCustomElements call all components will be available like HTML5 elements:

<nv-table>
  <nv-table-head>
    <nv-table-cell>Name</nv-table-cell>
    <nv-table-cell>Job Title</nv-table-cell>
    <nv-table-cell>Salary</nv-table-cell>
  </nv-table-head>
  <nv-table-body>
    <nv-table-row>
      <nv-table-cell>Rhianna</nv-table-cell>
      <nv-table-cell>International Program Officer</nv-table-cell>
      <nv-table-cell>$972</nv-table-cell>
    </nv-table-row>
    <nv-table-row>
      <nv-table-cell>Archibald</nv-table-cell>
      <nv-table-cell>Central Tactics Planner</nv-table-cell>
      <nv-table-cell>$852</nv-table-cell>
    </nv-table-row>
    <nv-table-row>
      <nv-table-cell>Deondre</nv-table-cell>
      <nv-table-cell>Forward Interactions Planner</nv-table-cell>
      <nv-table-cell>$274</nv-table-cell>
    </nv-table-row>
  </nv-table-body>
</nv-table>

How to add icons to the project

Assuming that you use Webpack to manage your build process.

  1. Install copy-webpack-plugin:

yarn add copy-webpack-plugin --dev

or

npm install copy-webpack-plugin --save-dev
  1. In your common webpack config (applied both in development and production modes), enable the plugin like so:

const CopyPlugin = require('copy-webpack-plugin');
// ...
module.exports = {
  // ...
  plugins: [
    new CopyPlugin([
      {
        from: 'node_modules/@noveo/web-components/dist/collection/assets',
        to: 'assets'
      }
    ])
  ]
};

That's it. Of course, you can replace this plugin with a similar plugin for the bundler/build tool you actually use. The idea is that the assets dir containing our standard set of icons must be copied from the @noveo/web-components module to your build root.

Components

nv-accordion

Properties

PropertyAttributeDescriptionTypeDefault
disableddisabledWhenether accordion is disabled or notbooleanfalse
labellabelLabel text for accordionstring''
openopenWhenether accordion is opened or notbooleanfalse

Events

EventDescriptionType
changeEvent returns current open valueCustomEvent<boolean>

Slots

SlotDescription
content to show when open

Dependencies

Depends on

Graph

graph TD;
  nv-accordion --> nv-icon
  nv-icon --> context-consumer
  style nv-accordion fill:#f9f,stroke:#333,stroke-width:4px

nv-alert

Properties

PropertyAttributeDescriptionTypeDefault
colorcolorAlertMods.DANGER or AlertMods.PRIMARY or AlertMods.SUCCESS or AlertMods.WARNAlertMods.PRIMARY
dismiss--(event: MouseEvent) => voidundefined
isOpenis-openbooleantrue
timeouttimeoutnumberundefined

nv-avatar

Properties

PropertyAttributeDescriptionTypeDefault
colorcolorThe color of the avatar background (for text children)string'#ff6c46'
heightheightThe height of the avatar (in pixels)number52
shapeshapeThe shape of the avatar (circle or square)Shape.circle or Shape.squareShape.circle
widthwidthThe width of the avatar (in pixels)number52

Slots

SlotDescription
content inside

nv-button

Properties

PropertyAttributeDescriptionTypeDefault
bigbigmakes the button taller and longerbooleanfalse
colorcolorcolor option (danger, success, primary, secondary)ButtonColors.danger or ButtonColors.primary or ButtonColors.secondary or ButtonColors.successButtonColors.primary
disableddisableddisables the button and changes stylesbooleanfalse
outlineoutlinechanges stylesbooleanfalse
sizesizesize option (xs, sm, md, lg, xl, xxl, responsive-container, responsive-text)ButtonSizes.lg or ButtonSizes.md or ButtonSizes.responsiveContainer or ButtonSizes.responsiveText or ButtonSizes.sm or ButtonSizes.xl or ButtonSizes.xs or ButtonSizes.xxlButtonSizes.responsiveText

nv-checkbox

Properties

PropertyAttributeDescriptionTypeDefault
checkedcheckedactivity flagbooleanfalse
descriptiondescriptiontext between label and checkboxstring''
disableddisableddisables the checkbox and changes stylesbooleanfalse
dropVariantdrop-variantchanges the styles of the active statebooleanfalse
errorerrorred text under the checkbox, makes the label redstring''
floatingIconfloating-iconWhether icon should be floated to the left (so text value nearby can wrap it)booleanfalse
labellabellarge text over checkboxstring''
namenamename prop for inputstring''
valuevaluecheckbox textstring''

Events

EventDescriptionType
changeonChange event returns isCheckedCustomEvent<boolean>

Dependencies

Used by

Depends on

Graph

graph TD;
  nv-checkbox --> nv-label
  nv-select --> nv-checkbox
  style nv-checkbox fill:#f9f,stroke:#333,stroke-width:4px

nv-chip

Properties

PropertyAttributeDescriptionTypeDefault
disableddisableddisables the chip and changes stylesbooleanfalse

Events

EventDescriptionType
closeonClose event(click on the cross)CustomEvent<any>

Slots

SlotDescription
"noname"nv-chip content

Dependencies

Used by

Depends on

Graph

graph TD;
  nv-chip --> nv-icon
  nv-icon --> context-consumer
  nv-search --> nv-chip
  nv-select --> nv-chip
  style nv-chip fill:#f9f,stroke:#333,stroke-width:4px

nv-color-field

Properties

PropertyAttributeDescriptionTypeDefault
descriptiondescriptiontext between label and checkboxstring''
disableddisabledis color picker disabled or notbooleanfalse
errorerrorerror messagestring''
labellabellarge text over color pickerstring''
types--Available edit panelsType[][Type.RGB, Type.HSL, Type.HSV, Type.HEX]
valuevalueinital value for color-pickerstring'#d00'
withAlphawith-alphaif component should control alpha channelbooleantrue

Dependencies

Depends on

Graph

graph TD;
  nv-color-field --> nv-label
  nv-color-field --> nv-dropdown
  nv-color-field --> nv-dropdown-button
  nv-color-field --> nv-dropdown-container
  nv-color-field --> nv-color-picker
  nv-color-picker --> nv-icon
  nv-icon --> context-consumer
  style nv-color-field fill:#f9f,stroke:#333,stroke-width:4px

nv-color-picker

Properties

PropertyAttributeDescriptionTypeDefault
disableddisabledis color picker disabled or notbooleanfalse
typetypeSelected edit panelType.HEX or Type.HSL or Type.HSV or Type.RGBthis.types[0]
types--Available edit panelsType[][Type.RGB, Type.HSL, Type.HSV, Type.HEX]
valuevalueinital value for color-pickerstring'#d00'
withAlphawith-alphaif component should control alpha channelbooleantrue

Events

EventDescriptionType
changeDispatches change event with following structure: hex - selected color in hex format color - instance of ColorCustomEvent<{ hex: string; color: any; }>

Dependencies

Used by

Depends on

Graph

graph TD;
  nv-color-picker --> nv-icon
  nv-icon --> context-consumer
  nv-color-field --> nv-color-picker
  style nv-color-picker fill:#f9f,stroke:#333,stroke-width:4px

nv-date-field

Properties

PropertyAttributeDescriptionTypeDefault
descriptiondescriptionText between label and elementstring''
digitPlaceholderdigit-placeholderCharacter instead of missing digitsstring'_'
disablePastDatesdisable-past-datesDisable past dates pick in date pickerbooleanfalse
errorerrorRed text under the element, makes the label and border redstring''
formatformatFormat string (date-fns) for the inputstring'dd-MM-yyyy'
fullwidthfullwidthShould the field have 100% width instead of the default widthbooleanfalse
hideAfterChangehide-after-changeClose dropdown picker after change datebooleantrue
labellabelLarge text over elementstring''
placeholderplaceholderInput placeholderstring''
rangerangeAllow the selection of date rangebooleanfalse
value--Value of date field as date object, or null, or array of two elements with the corresponding values for range modeDate or Date[]this.range ? [new Date(), addDays(new Date(), 1)] : new Date()

Events

EventDescriptionType
changeonChange event returns a date object, or null if no value is present, or an array of two elements with the corresponding values for range modeCustomEvent<any>

Dependencies

Depends on

Graph

graph TD;
  nv-date-field --> nv-dropdown
  nv-date-field --> nv-dropdown-button
  nv-date-field --> nv-date-input
  nv-date-field --> nv-icon
  nv-date-field --> nv-dropdown-container
  nv-date-field --> nv-date-picker
  nv-date-field --> nv-label
  nv-date-input --> nv-input
  nv-date-input --> context-consumer
  nv-icon --> context-consumer
  nv-date-picker --> nv-icon
  nv-date-picker --> context-consumer
  style nv-date-field fill:#f9f,stroke:#333,stroke-width:4px

nv-date-input

Properties

PropertyAttributeDescriptionTypeDefault
digitPlaceholderdigit-placeholderCharacter instead of missing digitsstring'_'
disableddisabledIf input is disabled or notbooleanfalse
formatformatFormat string (date-fns) for the date input, no need for time inputstringthis.inputType === DateOrTimeInputType.DATE ? 'dd-MM-yyyy' : 'HH:mm'
fullwidthfullwidthShould the input have 100% width instead of the default widthbooleanfalse
inputTypeinput-typeType of inputDateOrTimeInputType.DATE or DateOrTimeInputType.TIMEDateOrTimeInputType.DATE
invalidinvalidIf input is invalid or notbooleanfalse
localeState--Current locale received from providerProviderStateundefined
placeholderplaceholderInput placeholderstring''
valuevalueValue of input as date object for date input, or string in 'HH:mm' format for time input, or nullDate or stringnull

Events

EventDescriptionType
blurCustomEvent<any>
changeonChange event returns a date object for date input, or a string in 'HH:mm' format for time input, or null if no value is presentCustomEvent<any>

Slots

SlotDescription
"icon"content for input slot

Dependencies

Used by

Depends on

Graph

graph TD;
  nv-date-input --> nv-input
  nv-date-input --> context-consumer
  nv-date-field --> nv-date-input
  nv-time-field --> nv-date-input
  style nv-date-input fill:#f9f,stroke:#333,stroke-width:4px

nv-date-picker

Properties

PropertyAttributeDescriptionTypeDefault
autoautoIf date picker should automatically switch to next value in range modebooleantrue
disablePastDatesdisable-past-datesDisable past dates pickbooleanfalse
rangerangeAllow the selection of date rangebooleanfalse
rangeStaterange-stateCurrently selected value in range mode Useful in cases when date picker is only allowed to select one of the datesnumber0
value--Value of date field as date object, or null, or array of two elements with the corresponding values for range modeDate or Date[]null

Events

EventDescriptionType
changeonChange event returns a date object, or null if no value is present, an array of two elements with the corresponding values for range modeCustomEvent<Date or Date[]>

Dependencies

Used by

Depends on

Graph

graph TD;
  nv-date-picker --> nv-icon
  nv-date-picker --> context-consumer
  nv-icon --> context-consumer
  nv-date-field --> nv-date-picker
  style nv-date-picker fill:#f9f,stroke:#333,stroke-width:4px

nv-dropdown

Properties

PropertyAttributeDescriptionTypeDefault
closeOutsideClickEventTypeclose-outside-click-event-typeevent type for useOutsideClickcloseOutsideEvents.click or closeOutsideEvents.mousedowncloseOutsideEvents.click
disableddisableddisables the dropdownbooleanfalse
fullfullFor full-width dropdowns (like select, serch, etc)booleanfalse
isContainerStaticis-container-staticsets position: static for nv-dropdown-containerbooleanfalse
isOpenis-openif the nv-dropdown-container should be visiblebooleanfalse
useAutoPositionuse-auto-positionthe dropdown-container is rendered on top if it does not fit on the screenbooleanfalse
useButtonClickuse-button-clicktoggles the dropdown after dropdown-button clickbooleantrue
useOutsideClickuse-outside-clickcloses the dropdown after an outside clickbooleantrue
widthwidthwidth option: flexible -> width: 100%; max-content -> width: max-content;DropdownButtonWidth.default or DropdownButtonWidth.flexible or DropdownButtonWidth.maxContentDropdownButtonWidth.default

Events

EventDescriptionType
toggleonToggle event returns isOpenCustomEvent<boolean>

Dependencies

Used by

Graph

graph TD;
  nv-color-field --> nv-dropdown
  nv-date-field --> nv-dropdown
  nv-navbar --> nv-dropdown
  nv-navbar-item --> nv-dropdown
  nv-search --> nv-dropdown
  nv-select --> nv-dropdown
  nv-services-menu --> nv-dropdown
  nv-time-field --> nv-dropdown
  style nv-dropdown fill:#f9f,stroke:#333,stroke-width:4px

nv-dropdown-button

Events

EventDescriptionType
dropdownToggleonDropdownToggle throws after clickCustomEvent<any>

Dependencies

Used by

Graph

graph TD;
  nv-color-field --> nv-dropdown-button
  nv-date-field --> nv-dropdown-button
  nv-navbar --> nv-dropdown-button
  nv-navbar-item --> nv-dropdown-button
  nv-search --> nv-dropdown-button
  nv-select --> nv-dropdown-button
  nv-services-menu --> nv-dropdown-button
  nv-time-field --> nv-dropdown-button
  style nv-dropdown-button fill:#f9f,stroke:#333,stroke-width:4px

nv-dropdown-container

Properties

PropertyAttributeDescriptionTypeDefault
isStaticis-staticset nv-dropdown-container position: staticbooleanfalse

Dependencies

Used by

Graph

graph TD;
  nv-color-field --> nv-dropdown-container
  nv-date-field --> nv-dropdown-container
  nv-navbar --> nv-dropdown-container
  nv-navbar-item --> nv-dropdown-container
  nv-search --> nv-dropdown-container
  nv-select --> nv-dropdown-container
  nv-services-menu --> nv-dropdown-container
  nv-time-field --> nv-dropdown-container
  style nv-dropdown-container fill:#f9f,stroke:#333,stroke-width:4px

nv-grid

Properties

PropertyAttributeDescriptionTypeDefault
tagtagstring'div'

nv-col

Properties

PropertyAttributeDescriptionTypeDefault
alignSelfLgalign-self-lgalign-self-lg connected with .align-self-lg-{$prop} class.string''
alignSelfMdalign-self-mdalign-self-md connected with .align-self-md-{$prop} class.string''
alignSelfSmalign-self-smalign-self-sm connected with .align-self-sm-{$prop} class.string''
alignSelfXlalign-self-xlalign-self-xl connected with .align-self-xl-{$prop} class.string''
alignSelfXsalign-self-xsalign-self-xs connected with .align-self-xs-{$prop} class.string''
displaydisplayAdd display-{$property} class;string''
lglglg connected with .col-lg-{$prop} class. For example: "lg = 6" add ".col-lg-6" class at classList.string''
mdmdmd connected with .col-md-{$prop} class. For example: "md = 6" add ".col-md-6" class at classList.string''
offsetLgoffset-lgofset-lg connected with .ofset-lg-{$prop} class.string''
offsetMdoffset-mdofset-md connected with .ofset-md-{$prop} class.string''
offsetSmoffset-smofset-sm connected with .ofset-sm-{$prop} class.string''
offsetXloffset-xlofset-xl connected with .ofset-xl-{$prop} class.string''
offsetXsoffset-xsofset-xs connected with .ofset-xs-{$prop} class.string''
orderLgorder-lgControls column order at lg screen resolution. Connected with order-lg-{$prop}. Also achived 'first' and 'last' property.string''
orderMdorder-mdControls column order at md screen resolution. Connected with order-md-{$prop}. Also achived 'first' and 'last' property.string''
orderSmorder-smControls column order at sm screen resolution. Connected with order-sm-{$prop}. Also achived 'first' and 'last' property.string''
orderXlorder-xlControls column order at xl screen resolution. Connected with order-xl-{$prop}. Also achived 'first' and 'last' property.string''
orderXsorder-xsControls column order at xs screen resolution. Connected with order-xs-{$prop}. Also achived 'first' and 'last' property.string''
smsmsm connected with .col-sm-{$prop} class. For example: "sm = 6" add ".col-sm-6" class at classList. For screens 600px ...string''
xlxlxs connected with .col-xs-{$prop} class. For example: "xs = 6" add ".col-xs-6" class at classList.string''
xsxsxs connected with .col-xs-{$prop} class. For example: "xs = 6" add ".col-xs-6" class at classList. For screens < 600px.string''

nv-container

Properties

PropertyAttributeDescriptionTypeDefault
fluidfluidEnable/disable fluid modebooleanfalse
tagtagHTML tag, which used as wrapperstring'div'

nv-row

Properties

PropertyAttributeDescriptionTypeDefault
alignContentLgalign-content-lgalignContent-lg connected with .align-content-lg-{$prop} class.string''
alignContentMdalign-content-mdalignContent-md connected with .align-content-md-{$prop} class.string''
alignContentSmalign-content-smalignContent-sm connected with .align-content-sm-{$prop} class.string''
alignContentXlalign-content-xlalignContent-xl connected with .align-content-xl-{$prop} class.string''
alignContentXsalign-content-xsalignContent-xs connected with .align-content-xs-{$prop} class.string''
alignLgalign-lgalign-lg connected with .align-items-lg-{$prop} class.string''
alignMdalign-mdalign-md connected with .align-items-md-{$prop} class.string''
alignSmalign-smalign-sm} connected with .align-items-sm}-{$prop} class.string''
alignXlalign-xlalign-xl connected with .align-items-xl-{$prop} class.string''
alignXsalign-xsalign-xs connected with .align-items-xs-{$prop} class.string''
justifyLgjustify-lgjustify-lg connected with .justify-content-lg-{$prop} class.string''
justifyMdjustify-mdjustify-md connected with .justify-content-md-{$prop} class.string''
justifySmjustify-smjustify-sm connected with .justify-content-sm-{$prop} class.string''
justifyXljustify-xljustify-xl connected with .justify-content-xl-{$prop} class.string''
justifyXsjustify-xsjustify-xs connected with .justify-content-xs-{$prop} class.string''
noGuttersno-guttersSet gutters = 0.booleanfalse

nv-icon

Properties

PropertyAttributeDescriptionTypeDefault
namenameThe icon to use from the built-in set of icons. Only alpha characters and dash are allowed.stringundefined
sizesizeThe size of the icon. Available options are: sm, md, lg, and xlg.IconSizes.LG or IconSizes.MD or IconSizes.SM or IconSizes.XLGIconSizes.SM
srcsrcThe exact path to an SVG file on a server. If used, it overrides the path formed by name and public-path attributes.stringundefined

Dependencies

Used by

Depends on

Graph

graph TD;
  nv-icon --> context-consumer
  nv-accordion --> nv-icon
  nv-chip --> nv-icon
  nv-color-picker --> nv-icon
  nv-date-field --> nv-icon
  nv-date-picker --> nv-icon
  nv-list-group --> nv-icon
  nv-navbar --> nv-icon
  nv-navbar-item --> nv-icon
  nv-search --> nv-icon
  nv-select --> nv-icon
  nv-time-field --> nv-icon
  nv-uploader --> nv-icon
  nv-upsloader --> nv-icon
  style nv-icon fill:#f9f,stroke:#333,stroke-width:4px

nv-icon-button

Properties

PropertyAttributeDescriptionTypeDefault
disableddisabledIf button disabledbooleanfalse

Dependencies

Used by

Graph

graph TD;
  nv-services-menu --> nv-icon-button
  style nv-icon-button fill:#f9f,stroke:#333,stroke-width:4px

nv-input

Properties

PropertyAttributeDescriptionTypeDefault
autocompleteautocompleteIf input should provide autocompletestring'on'
autofocusautofocusIf input should autofocus on mountbooleanfalse
controlledcontrolledIf input is controlled or notbooleanfalse
defaultValuedefault-valueDefault value for the inputstring''
disableddisabledIf input is disabled or notbooleanfalse
flexibleflexiblemakes the input stretch (use with useContainer = false)booleanfalse
inputTabIndexinput-tab-indextabIndex of the inputnumber0
invalidinvalidIf input is invalid or notbooleanfalse
namenameName attribute for the inputstring''
placeholderplaceholderPlaceholder for the inputstring''
readonlyreadonlyWhenever input is readonly or notbooleanfalse
requiredrequiredWhenever input is required or notbooleanfalse
typetypeType attribute for the inputstring'text'
uiduidUsed for connect nv-label and nv-input as default browser "for - id" pair.string''
useContaineruse-containerUse styled div containerbooleantrue
valuevalueValue for the inputstringthis.defaultValue

Events

EventDescriptionType
blurCustomEvent<void>
changeonChange event returns current input valueCustomEvent<string>

Dependencies

Used by

Graph

graph TD;
  nv-date-input --> nv-input
  nv-search --> nv-input
  nv-select --> nv-input
  nv-text-field --> nv-input
  style nv-input fill:#f9f,stroke:#333,stroke-width:4px

nv-label

Properties

PropertyAttributeDescriptionTypeDefault
descriptiondescriptiontext between label and elementstring''
errorerrorred text under the element, makes the label redstring''
labellabellarge text over elementstring''
requiredrequiredWhenever input is required or notbooleanfalse
uiduidUsed for connect nv-label and nv-input as default browser "for - id" pair.string''

Dependencies

Used by

Graph

graph TD;
  nv-checkbox --> nv-label
  nv-color-field --> nv-label
  nv-date-field --> nv-label
  nv-radio-group --> nv-label
  nv-select --> nv-label
  nv-switch --> nv-label
  nv-text-field --> nv-label
  nv-time-field --> nv-label
  style nv-label fill:#f9f,stroke:#333,stroke-width:4px

nv-list-group

Properties

PropertyAttributeDescriptionTypeDefault
disableddisabledDisables the list and changes stylesbooleanfalse
flexDirectionflex-directionFlex direction option (column, row)FlexDirections.COLUMN or FlexDirections.COLUMN_REVERSE or FlexDirections.ROW or FlexDirections.ROW_REVERSEFlexDirections.COLUMN
labellabelLarge main text in the head of the Liststring''

Dependencies

Depends on

Graph

graph TD;
  nv-list-group --> nv-icon
  nv-icon --> context-consumer
  style nv-list-group fill:#f9f,stroke:#333,stroke-width:4px

nv-list

Properties

PropertyAttributeDescriptionTypeDefault
flexDirectionflex-directionFlex direction option (column, row)FlexDirections.COLUMN or FlexDirections.COLUMN_REVERSE or FlexDirections.ROW or FlexDirections.ROW_REVERSEFlexDirections.COLUMN

nv-list-item

Properties

PropertyAttributeDescriptionTypeDefault
disableLeftPaddingdisable-left-paddingDisable left padding. You can add your own styles with css.booleanfalse
flexDirectionflex-directionFlex direction option (column, row)FlexDirections.COLUMN or FlexDirections.COLUMN_REVERSE or FlexDirections.ROW or FlexDirections.ROW_REVERSEFlexDirections.COLUMN

nv-loader

nv-locale-provider

Properties

PropertyAttributeDescriptionTypeDefault
localelocaleLocales.EN or Locales.RULocales.RU

Slots

SlotDescription
components that depend on provider state

Dependencies

Depends on

Graph

graph TD;
  nv-locale-provider --> context-consumer
  style nv-locale-provider fill:#f9f,stroke:#333,stroke-width:4px

nv-modal

Properties

PropertyAttributeDescriptionTypeDefault
bodyClassbody-classClass to add to document.body when modal is mountedstring'overflow'
closeOnBackdropClickclose-on-backdrop-clickIf modal should close when clicking on backdropbooleantrue
fixedfixedIf modal is fixed or absolutebooleantrue
openopenIf modal is open or notbooleantrue
overflowoverflowWhich overflow value to use for inner container"auto" or "hidden" or "visible"'auto'
positionpositionPosition of the modal window inside containerModalPositions.BOTTOM_CENTER or ModalPositions.BOTTOM_LEFT or ModalPositions.BOTTOM_RIGHT or ModalPositions.MIDDLE_CENTER or ModalPositions.MIDDLE_LEFT or ModalPositions.MIDDLE_RIGHT or ModalPositions.TOP_CENTER or ModalPositions.TOP_LEFT or ModalPositions.TOP_RIGHTModalPositions.MIDDLE_CENTER
sizesizeSize of the modal windowModalSizes.DEFAULT or ModalSizes.LG or ModalSizes.MD or ModalSizes.SM or ModalSizes.XLModalSizes.DEFAULT
zIndexz-indexCustom z-index if needednumberundefined

Events

EventDescriptionType
toggleToggle event returns current modal open stateCustomEvent<boolean>

Slots

SlotDescription
content of modal window

nv-modal-actions

Slots

SlotDescription
content inside

nv-navbar

Properties

PropertyAttributeDescriptionTypeDefault
hidingDistancehiding-distanceThe minimum distance between the last normal item and the stand-alone item (with the is-last attribute) of the nv-navbar-main sub-component. If the distance is reached, the last normal item will be hidden within the dynamically generated More dropdown item.number60
isVerticalis-verticalIf the navbar should have a vertical orientation with menu items stacked on top of each other.booleanfalse
localeState--The current localeProviderStateundefined

Slots

SlotDescription
One or more of the nv-navbar's sub-components. The normal order is: nv-navbar-start, nv-navbar-main, nv-navbar-end.

Dependencies

Depends on

Graph

graph TD;
  nv-navbar --> nv-dropdown
  nv-navbar --> nv-dropdown-button
  nv-navbar --> nv-dropdown-container
  nv-navbar --> nv-icon
  nv-navbar --> nv-navbar-item
  nv-navbar --> context-consumer
  nv-icon --> context-consumer
  nv-navbar-item --> nv-dropdown
  nv-navbar-item --> nv-dropdown-button
  nv-navbar-item --> nv-icon
  nv-navbar-item --> nv-dropdown-container
  style nv-navbar fill:#f9f,stroke:#333,stroke-width:4px

nv-navbar-end

Slots

SlotDescription
Whatever. You only get the predefined formatting. Normally, it is used to place a clickable image and a drop-down menu for the currently logged-in user. Note: Use <a class="user-link"> along with <nv-navbar-item class="user-menu"> to get a well-formed user block with little effort.

nv-navbar-item

Properties

PropertyAttributeDescriptionTypeDefault
arrowBeforearrow-beforeIf the arrow should go before the item's title. Applies only if the isDropdown prop is true.booleanfalse
arrowToarrow-toThe direction of the arrow. Applies only if the isDropdown prop is true."bottom" or "left" or "right" or "top"'bottom'
isActiveis-activeIf special styles should be applied to the item to highlight it among the others. Normally, it will be the current page item.booleanfalse
isDropdownis-dropdownIf the item should be used as a dropdown menu. When true, the item must have elements with slot="title" and slot="content" attributes as its children to enable the drop-down behavior.booleanfalse
isLastis-lastIf the item should stand alone in the end of the nv-navbar-main sub-component. Normally, it will be the Services menu icon.booleanfalse
noArrowno-arrowIf the arrow should be hidden. Applies only if the isDropdown prop is true.booleanfalse

Slots

SlotDescription
Whatever
"addon"Anything to be placed just before the item's title.
"content"The drop-down's content. It must be a ul element with li children elements if you want to get a well-formed list with little effort.
"title"The item's title that usually is (but doesn't have to be) text.

Dependencies

Used by

Depends on

Graph

graph TD;
  nv-navbar-item --> nv-dropdown
  nv-navbar-item --> nv-dropdown-button
  nv-navbar-item --> nv-icon
  nv-navbar-item --> nv-dropdown-container
  nv-icon --> context-consumer
  nv-navbar --> nv-navbar-item
  style nv-navbar-item fill:#f9f,stroke:#333,stroke-width:4px

nv-navbar-main

Slots

SlotDescription
One or more nv-navbar-item-s

nv-navbar-start

Slots

SlotDescription
Whatever. You only get the predefined formatting. Normally, it is used to place a graphic or text logo representing a brand.

nv-pagination

Properties

PropertyAttributeDescriptionTypeDefault
activeItemactive-itemThe active (current) page numbernumber1
ariaLabelaria-labelThe component's aria-labelstring'Pagination'
limitlimitThe number of pagination items viewable at a time.number7
totaltotalThe total number of pagesnumberundefined

Events

| Event | Des

0.0.16

4 months ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.1-beta.1

4 years ago

0.0.1-alpha.2

4 years ago

0.0.1-alpha.1

4 years ago