New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@noveo/web-components

Package Overview
Dependencies
Maintainers
7
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noveo/web-components

Noveo Web Components

  • 0.0.16
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-72.73%
Maintainers
7
Weekly downloads
 
Created
Source

Noveo Logo

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

EventDescriptionType
pageChangeCustomEvent<any>

Dependencies

Depends on

Graph

graph TD;
  nv-pagination --> nv-pagination-item
  style nv-pagination fill:#f9f,stroke:#333,stroke-width:4px

nv-paper

Properties

PropertyAttributeDescriptionTypeDefault
colorcolorChoose color from standart presets;ColorTypes.FORM or ColorTypes.TRANSPARENT or ColorTypes.WHITEColorTypes.FORM
paddingpaddingAdd paddings from presetted sizes;PaddingSizes.LG or PaddingSizes.MD or PaddingSizes.NONE or PaddingSizes.SMPaddingSizes.NONE
shadowshadowEnable/disable box-shadow;booleanfalse
tagtagHTML - tag, which used as wrapperstring'div'
tiletileReset border-radius on container;booleanfalse

Slots

SlotDescription
"slot"slot for the components you want to place inside nv-paper

nv-radio-group

Properties

PropertyAttributeDescriptionTypeDefault
columncolumnswitch flex-direction (row or column)booleantrue
descriptiondescriptiontext between label and radio-groupstring''
errorerrorred text under the radio-group, makes the label redstring''
labellabellarge text over radio-groupstring''
valuevaluemakes an element with this value activestringnull

Events

EventDescriptionType
changeonChange event returns the value of the selected radioCustomEvent<string>

Dependencies

Depends on

Graph

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

nv-radio

Properties

PropertyAttributeDescriptionTypeDefault
checkedcheckedactivity flagbooleanfalse
disableddisableddisables the radio and changes stylesbooleanfalse
labellabelradio textstring''
namenamename prop for inputanyundefined
valuevalueonChange datastringundefined

Events

EventDescriptionType
changeonChange event returns valueCustomEvent<string>

Properties

PropertyAttributeDescriptionTypeDefault
disableddisableddisables the select and changes stylesbooleanfalse
isOpenis-openfor autofocusbooleanfalse
itemGroupIconitem-group-iconname for group-icon property of item objectstring'groupIcon'
itemGroupItemsitem-group-itemsname for group-items property of item objectstring'groupItems'
itemGroupTextitem-group-textname for group-text property of item objectstring'groupText'
itemGroupValueitem-group-valuename for group-value property of item objectstring'groupValue'
itemTextitem-textname for text property of item objectstring'text'
itemValueitem-valuename for value property of item objectstring'value'
items--initial dataany[][]
notFoundMessagenot-found-messagewill be shown when searching if nothing is foundstring'Ничего не найдено'
placeholderplaceholderplaceholderstring''
returnObjectreturn-objectreturn value or item objectbooleanfalse
typetypestyle option (primary, multifilter)SearchTypes.MULTIFILTER or SearchTypes.PRIMARYSearchTypes.MULTIFILTER
value--initial valueany[][]

Events

EventDescriptionType
changeonChange event returns selected valuesCustomEvent<any>

Dependencies

Depends on

Graph

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

nv-select

Properties

PropertyAttributeDescriptionTypeDefault
descriptiondescriptiontext between label and selectstring''
disableddisableddisables the select and changes stylesbooleanfalse
errorerrorred text under the select, makes the label redstring''
itemItemsitem-itemsname for items property of item objectstring'items'
itemTextitem-textname for text property of item objectstring'text'
itemValueitem-valuename for value property of item objectstring'value'
items--initial dataany[][]
labellabellarge text over selectstring''
namenamename attributestring''
placeholderplaceholderplaceholderstring''
returnObjectreturn-objectreturn value or item objectbooleanfalse
typetypestyle option (primary, checkbox, multi)SelectTypes.checkbox or SelectTypes.multi or SelectTypes.primarySelectTypes.primary
valuevalueinitial valueanynull

Events

EventDescriptionType
changeonChange event returns selected valuesCustomEvent<any>
changeSearchonChangeSearch event returns search stringCustomEvent<any>

Dependencies

Depends on

Graph

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

nv-services-menu

Properties

PropertyAttributeDescriptionTypeDefault
initialNumberOfBlocksinitial-number-of-blocksthe number of blocks that will be visible initiallynumber9
localeState--Locale received from locale providerProviderStateundefined
numberOfBlocksnumber-of-blocksnumber of services transferred will be generated the number of slots with names 'service-block-$id' $id = (0 , numberOfBlocks-1)number0
showAllshow-allfalse - show max initialNumberOfBlocks services true - show all servicesbooleanfalse

Slots

SlotDescription
"button"for button
"service-block-$id"slot for the service components you want to place inside nv-services-menu

Dependencies

Depends on

Graph

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

nv-spacer

Properties

PropertyAttributeDescriptionTypeDefault
sizesizeNumber inside this props are height of this component. !IMPORTANT: You must specify the unit of measurement: px, em, rem, or another.string'20px'

nv-switch

Properties

PropertyAttributeDescriptionTypeDefault
checkedcheckedactivity flagbooleanfalse
descriptiondescriptiontext between label and switchstring''
disableddisableddisables the switch and changes stylesbooleanfalse
errorerrorred text under the switch, makes the label redstring''
labellabellarge text over switchstring''
namenamename prop for inputstring''
valuevalueswitch textstring''

Events

EventDescriptionType
changeonChange event returns isCheckedCustomEvent<boolean>

Dependencies

Depends on

Graph

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

nv-table

Properties

PropertyAttributeDescriptionTypeDefault
layoutlayoutWhich table layout to useTableLayout.auto or TableLayout.fixedTableLayout.auto

Slots

SlotDescription
content inside

nv-table-body

Slots

SlotDescription
content inside

nv-table-cell

Properties

PropertyAttributeDescriptionTypeDefault
alignalignText alignment for cell content Can be overwritten in child componentTableCellAlignments.center or TableCellAlignments.left or TableCellAlignments.rightTableCellAlignments.left
colSpancol-spanhow many cells to span acrossnumbernull
colorcolorTableCellColors.danger or TableCellColors.default or TableCellColors.success or TableCellColors.temp or TableCellColors.whiteTableCellColors.default
rowSpanrow-spanhow many rows to span acrossnumbernull
splitterssplittersWhich splitters to use between rows and columns Can be overwritten in child componentTableSplitters.all or TableSplitters.horizontal or TableSplitters.none or TableSplitters.partial or TableSplitters.verticalTableSplitters.all

nv-table-head

Slots

SlotDescription
content inside

nv-table-row

Properties

PropertyAttributeDescriptionTypeDefault
colorcolorTableRowColors.danger or TableRowColors.default or TableRowColors.success or TableRowColors.temp or TableRowColors.whiteTableRowColors.default
splitterssplittersTableSplitters.all or TableSplitters.horizontal or TableSplitters.none or TableSplitters.partial or TableSplitters.verticalundefined

nv-tabs

Properties

PropertyAttributeDescriptionTypeDefault
activeactiveid of the active tabstringdefaultActive
modemodeactive mode allows you to switch tabs when clickedTabMode.active or TabMode.passiveTabMode.active
typetypestyle option (primary, secondary, table)TabTypes.primary or TabTypes.secondary or TabTypes.tableTabTypes.primary

Events

EventDescriptionType
changeonChange event returns the active-tab-id of the selected tabCustomEvent<string>

nv-tab

Properties

PropertyAttributeDescriptionTypeDefault
activeTabIdactive-tab-idid for tab-button selectingstring'0'
typetypestyle option (primary, secondary, table)TabTypes.primary or TabTypes.secondary or TabTypes.tableTabTypes.primary

nv-tab-content

Properties

PropertyAttributeDescriptionTypeDefault
activeactiveid of the displayed tab-panestring'0'

nv-tab-pane

Properties

PropertyAttributeDescriptionTypeDefault
tabIdtab-idid for tab selectingstring'0'

nv-text

Properties

PropertyAttributeDescriptionTypeDefault
boldboldFont-weightBoldTypes.bold or BoldTypes.normal or BoldTypes.semiBoldTypes.normal
italicitalicAdd italic - style for current text-typebooleanfalse
nomarginnomarginRemove Default margins form HTML tagbooleanfalse
tagtagHTML tag in which the text will be renderedstring'span'
typetypeType of style-presetTextTypes.comment or TextTypes.component-comment or TextTypes.dropdown-selected or TextTypes.error or TextTypes.h1 or TextTypes.h2 or TextTypes.h3 or TextTypes.h3-error or TextTypes.input-placeholder or TextTypes.input-text or TextTypes.link or TextTypes.menu-item or TextTypes.menu-item-selected or TextTypes.text or TextTypes.text-btn-big or TextTypes.text-btn-smallTextTypes.text

nv-text-field

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 input""undefined
descriptiondescriptiontext between label and elementstring''
disableddisabledIf input is disabled or notbooleanfalse
errorerrorred text under the element, makes the label redstring''
invalidinvalidIf input is invalid or notbooleanfalse
labellabellarge text over elementstring''
namenameName attribute for the inputstring''
placeholderplaceholderPlaceholder for the inputstring''
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 input""this.defaultValue

Dependencies

Depends on

Graph

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

nv-textarea

Properties

PropertyAttributeDescriptionTypeDefault
autoGrowauto-growIf the textarea should grow in height (instead of showing the scrollbar) to accommodate new content when it is about to overflow.booleantrue
autocapitalizeautocapitalizeThe same as in the native <textarea>stringundefined
autofocusautofocusThe same as in the native <textarea>booleanfalse
colscolsThe same as in the native <textarea>number20
disableddisabledThe same as in the native <textarea>booleanundefined
formformThe same as in the native <textarea>stringundefined
innerIdinner-idThe value of the id attribute of the inner native <textarea> element.stringundefined
invalidinvalidIf special styles should be applied to visually indicate the component's invalid state.booleanfalse
maxRowsmax-rowsIf the content reaches this number of rows, the scrollbar will show up. Applies only when the autoGrow is true.numberundefined
maxlengthmaxlengthThe same as in the native <textarea>numberundefined
minlengthminlengthThe same as in the native <textarea>numberundefined
namenameThe same as in the native <textarea>stringundefined
noHandleno-handleIf the native drag handle for textarea resizing should be visible.booleanfalse
placeholderplaceholderThe same as in the native <textarea>stringundefined
readonlyreadonlyThe same as in the native <textarea>booleanundefined
requiredrequiredThe same as in the native <textarea>booleanundefined
rowsrowsThe same as in the native <textarea>number2
spellcheckspellcheckThe same as in the native <textarea>booleantrue
valuevalueThe same as in the native <textarea>string''
wrapwrapThe same as in the native <textarea>stringundefined

Events

EventDescriptionType
changeCustomEvent<any>

nv-time-field

Properties

PropertyAttributeDescriptionTypeDefault
descriptiondescriptionText between label and elementstring''
digitPlaceholderdigit-placeholderCharacter instead of missing digitsstring'_'
disableddisabledIf input is disabled or notbooleanfalse
errorerrorRed text under the element, makes the label redstring''
fullwidthfullwidthShould the field have 100% width instead of the default widthbooleanfalse
labellabelLarge text over elementstring''
localeState--Locale received from locale providerProviderStateundefined
placeholderplaceholderInput placeholderstringnull
valuevalueValue of time field as string in 'HH:mm' format, or nullstringnull

Events

EventDescriptionType
changeonChange event returns a string in "HH:mm" format, or null if no value is presentCustomEvent<string>

Dependencies

Depends on

Graph

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

nv-time-picker

Properties

PropertyAttributeDescriptionTypeDefault
localeState--Locale received from locale providerProviderStateundefined
valuevalueValue of time field as string in 'HH:mm' format, or nullstringnull

Events

EventDescriptionType
changeonChange event returns value as string in 'HH:mm' format if both minutes and hours are selectedCustomEvent<string>

Dependencies

Used by

Depends on

Graph

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

nv-title

Properties

PropertyAttributeDescriptionTypeDefault
errorerrorUsed for add the .error class and change the text color to red;booleanfalse
nomarginnomarginRemove Default margins form Headingsbooleanfalse
tagtagType of tagstring'h3'
typetypeType of style-presetTextTypes.h1 or TextTypes.h2 or TextTypes.h3TextTypes.h3

nv-tooltip

Properties

PropertyAttributeDescriptionTypeDefault
boundaryboundaryThe element that should act as boundaries for the tooltip.TooltipBoundaries.DOCUMENT or TooltipBoundaries.VIEWPORTTooltipBoundaries.VIEWPORT
dataPopperPlacementdata-popper-placementPopper attribute. You shouldn't use it.TooltipPlacements.AUTO or TooltipPlacements.AUTO_END or TooltipPlacements.AUTO_START or TooltipPlacements.BOTTOM or TooltipPlacements.BOTTOM_END or TooltipPlacements.BOTTOM_START or TooltipPlacements.LEFT or TooltipPlacements.LEFT_END or TooltipPlacements.LEFT_START or TooltipPlacements.RIGHT or TooltipPlacements.RIGHT_END or TooltipPlacements.RIGHT_START or TooltipPlacements.TOP or TooltipPlacements.TOP_END or TooltipPlacements.TOP_STARTundefined
fadeTimefade-timeThe duration (in seconds) of the tooltip fade-out effect animationnumber0.4
flipflipIf the tooltip should auto-flip when it starts to overlap its target element.booleantrue
hideTriggershide-triggersThe space-separated events that should close the tooltip when fired on the target (eg. mouseout blur). If empty, the tooltip will never be closed from outside. FYI: You will hardly ever need this attribute, since 'opposite' events for common triggers are added automagically.stringundefined
isOpenis-openIf the tooltip should be visiblebooleanfalse
noArrowno-arrowIf the tooltip arrow should be hiddenbooleanfalse
placementplacementThe tooltip placement relative to the targetTooltipPlacements.AUTO or TooltipPlacements.AUTO_END or TooltipPlacements.AUTO_START or TooltipPlacements.BOTTOM or TooltipPlacements.BOTTOM_END or TooltipPlacements.BOTTOM_START or TooltipPlacements.LEFT or TooltipPlacements.LEFT_END or TooltipPlacements.LEFT_START or TooltipPlacements.RIGHT or TooltipPlacements.RIGHT_END or TooltipPlacements.RIGHT_START or TooltipPlacements.TOP or TooltipPlacements.TOP_END or TooltipPlacements.TOP_STARTTooltipPlacements.AUTO
showTriggersshow-triggersThe space-separated events that should open the tooltip when fired on the target (eg. mouseover focus). FYI: If a single click trigger is provided (without hide-triggers), another click event will also be registered on the document object to close the tooltip, for your convenience.stringundefined
targettargetThe CSS selector of the target elementstringundefined
timeouttimeoutHow long in milliseconds the tooltip should stay open after the page load.numberundefined

Slots

SlotDescription
for nv-tooltip-content

Dependencies

Depends on

Graph

graph TD;
  nv-tooltip --> nv-tooltip-arrow
  style nv-tooltip fill:#f9f,stroke:#333,stroke-width:4px

nv-tooltip-arrow

Properties

PropertyAttributeDescriptionTypeDefault
placementplacementarrow placement set from nv-tooltipstringTooltipPlacements.AUTO

Dependencies

Used by

Graph

graph TD;
  nv-tooltip --> nv-tooltip-arrow
  style nv-tooltip-arrow fill:#f9f,stroke:#333,stroke-width:4px

nv-tooltip-content

Slots

SlotDescription
tooltip content

nv-uploader

Properties

PropertyAttributeDescriptionTypeDefault
acceptacceptThe comma-separated list of allowed file types. Note: when strict is false, this attribute has the same behavior as in the native <input type="file">: works only for file selector dialogs (has no effect on the 'drag-n-drop' feature) and can be opted out.stringundefined
capturecaptureThe string specifying which camera to use for capture. The same as in the native <input type="file">stringundefined
files--The FileList object listing every selected file. The same as in the native <input type="file">FileListundefined
hinthintThe scrollable text description appearing under the file type icons when no files have yet been selected or uploaded.stringundefined
invalidinvalidIf special styles should be applied to visually indicate the component's invalid state (ie. wrong files have been selected).booleanfalse
localImageUrls--The object holding names and urls of the locally selected image files.{ [key: string]: string; }{}
modemodeThe mode of file presentation: file – guarantees a document icon plus a file name as a caption. image – guarantees a preview thumb (for supported image types) or a document icon (for unsuppported image types and non-image files) plus a file name as a tooltip. auto – chooses file or image mode for you depending on which file types prevail – image or non-image ones. It is the default mode suitable for most use cases.Modes.AUTO or Modes.FILE or Modes.IMAGEModes.AUTO
multiplemultipleIf more than 1 file can be selected at a time. Note: when strict is false, this attribute has the same behavior as in the native <input type="file">: works only for file selector dialogs (has no effect on the 'drag-n-drop' feature).booleanfalse
progressprogressThe number (percentage out of 100) that will be used as the current value for the inner upload progress bar.numberundefined
sizesizeThe size of the Uploaderstring'md'
strictstrictIf strict checks against the multiple and accept attributes should be enabled. If true, the component will actually restrict the number and types of files users can select (even with the 'drag-n-drop' feature) and will set the visual invalid state as needed.booleantrue
upload--If a function is provided for this prop, the additional upload icon will be shown upon file selection. A click on that icon will call the provided function.(event: MouseEvent or KeyboardEvent, hostEl: HTMLElement) => voidundefined
uploadedFiles--The array of objects holding the uploaded files data: name, type, and url.{ name?: string; type: string; url?: string; }[]undefined

Events

EventDescriptionType
changeCustomEvent<any>
uploadCancelCustomEvent<any>

Dependencies

Depends on

Graph

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

nv-upsloader

Properties

PropertyAttributeDescriptionTypeDefault
acceptacceptThe comma-separated list of allowed file types. Note: When strict is false, this attribute has the same behavior as in the native <input type="file">: works only for file selector dialogs (has no effect on the 'drag-n-drop' feature) and can be opted out.stringundefined
allFiles--The array listing every selected file. Each file is a native File object.File[][]
capturecaptureThe same as in the native <input type="file">stringundefined
fileMaxNumberfile-max-numberThe maximum allowed number of files. Note: Any 'falsy' value means 'not restricted'.numberundefined
fileMaxSizefile-max-sizeThe maximum allowed size (in bytes) of a single file. Note: Any 'falsy' value means 'not restricted'.numberundefined
hinthintThe scrollable text/html description appearing under the file type icons when no files have yet been selected or uploaded.stringundefined
invalidinvalidIf special styles should be applied to visually indicate the component's invalid state (ie. too many files have been selected).booleanfalse
localImageUrls--The object holding names and urls of the locally selected image files.{ [key: string]: string; }{}
localeState--The current locale that controls all aspects of the component i18n.ProviderStateundefined
modemodeThe mode of file presentation: file – guarantees a document icon plus a file name as a caption. image – guarantees a preview thumb (for supported image types) or a document icon (for unsupported image types and non-image files) plus a file name as a tooltip. auto – chooses file or image mode for you depending on which file types prevail – image or non-image ones. It is suitable for most cases.Modes.AUTO or Modes.FILE or Modes.IMAGEModes.AUTO
multiplemultipleIf more than 1 file can be selected at a time. Note: when strict is false, this attribute has the same behavior as in the native <input type="file">: works only for file selector dialogs (has no effect on the 'drag-n-drop' feature).booleanfalse
progressprogressThe number (percentage out of 100) that will be used as the current value for the inner upload progress bar.numberundefined
sizesizeThe size of the Upsloader that also affects its shape: standard (rectangle) or smaller (square)."md" or "sm"'md'
strictstrictIf strict checks against the multiple, accept, file-max-size, and file-max-number attributes should be enabled. If true, the component will actually restrict the number, type, and size of files users can select (even with the 'drag-n-drop' feature) and will set the visual invalid state as needed.booleantrue
upload--If a function is provided for this prop, the additional upload icon will be shown upon file selection. A click on that icon will call the provided function.(event: MouseEvent or KeyboardEvent, hostEl: HTMLElement) => voidundefined
uploadedFiles--The array of objects holding the uploaded files data: name, type, and url.CustomFile[]undefined

Events

EventDescriptionType
changeCustomEvent<any>
uploadCancelCustomEvent<any>

Dependencies

Depends on

Graph

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

nv-public-path-provider

Properties

PropertyAttributeDescriptionTypeDefault
customIcons--{}{}
publicPathpublic-pathstring'/assets/icons/'

Slots

SlotDescription
components that depend on provider state

Dependencies

Depends on

Graph

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

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc