Socket
Book a DemoInstallSign in
Socket

@evolv-delivery/vds-components

Package Overview
Dependencies
Maintainers
6
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evolv-delivery/vds-components

A library of web components for rapid experiment development. Built to be compatible with the Verizon Design System 3.0

latest
Source
npmnpm
Version
1.2.6
Version published
Maintainers
6
Created
Source

Verizon Design System

A library of web components for experiments.

NPM scripts

ScriptDescription
npm run buildBuilds dist/../index.js files
npm run watchAutomatically builds on save of src/index.js
npm run serveHosts dist folder on port 4444
npm run devWatch and serve
npm run shipBuild and publish to npm
npm startSame as npm run dev

Using in a project

Verizon Design System components are automatically available anywhere the integration is active.

Local Hosting

Run npm start to host locally. To run in your browser inject the following into your <head> tag using Resource Override

(() => {
    if (window.self !== window.top) return;
    
    console.log('[evolv-local] vds-components: inject')
    
    const script = document.createElement('script');
    script.type = 'module';
    script.text = 'import integration from "http://localhost:4444/index.js"; console.log("[evolv-local] vds-components: load"); integration()';
    document.head.appendChild(script);
})();

Base Component

The core component from which all other components inherit. This gives the following properties to all components:

Properties

NameDescriptionDefaultAccepts
breakpointThe screensize to display tablet and desktop styles. Can be set globally by setting window.evolv.vds.breakpoint768px<css-size>
colorThe text color of the componentinheritinherit, <color-code>, <css-color>
cssA stylesheet to add to the component. Selectors are required, @media statements are valid.null<css-stylesheet>
surfaceWhether to style the component for a light or dark backgroundlightlight, dark

Color Codes

OptionHex
black#000000
white#ffffff
red#ee0000
gray-11#1b1d1f
gray-20#333333
gray-44#6f7171
gray-65#a7a7a7
gray-85#d8dada
gray-95#f6f6f6

Example:

<evolv-title size="2xlarge" color="white">Buy more phones</evolv-title>

CSS Color

Any valid CSS color.

Example:

<evolv-icon name="trash-can" color="#ee0000" size="1.5rem"></evolv-icon>
<evolv-button-icon name="close" color="rgb(111, 11, 1)" size="large"></evolv-button-icon>

CSS Stylesheet

CSS to be injected into the style tag.

Example:

<evolv-button css=".button {background-color: var(--color-red); color: var(--color-gray-95)}">Button<>

Components

Accordion

Tag

<evolv-accordion title-size="medium">
  <evolv-accordion-item>
    <evolv-accordion-header>Aries</evolv-accordion-header>
    <evolv-accordion-details>It's going to be a regular day, nothing special.</evolv-accordion-details>
  </evolv-accordion-item>
  <evolv-accordion-item>
    <evolv-accordion-header>Taurus</evolv-accordion-header>
    <evolv-accordion-details>Yikes. It's not looking so good, maybe stay home.</evolv-accordion-details>
  </evolv-accordion-item>
  <evolv-accordion-item>
    <evolv-accordion-header>Gemini</evolv-accordion-header>
    <evolv-accordion-details>This is it, the day you've been waiting for! Wear your good shirt.</evolv-accordion-details>
  </evolv-accordion-item>
  <evolv-accordion-item>
    <evolv-accordion-header>Cancer</evolv-accordion-header>
    <evolv-accordion-details>Ominous winds blow from the east. Something nameless stirres from its ancient slumber. Highlight marital status.</evolv-accordion-details>
  </evolv-accordion-item>
</evolv-accordion>

Properties

NameDescriptionDefaultAccepts
disable-trackWhether to disable Adobe Target trackingfalsetrue, false
breakpointUsed by evolv-title and evolv-button-icon elements to increase size above a certain screen width768px<css length>
durationSets the animation duration for opening evolv-details panels0.33s<css duration>
handle-alignWhether the accordion handle is aligned left or rightleftleft, right
icon-sizeThe size of the evolv-button-icon element,Based on title-size if present, otherwise smallsmall, large
idA name for the accordion, used by data-track attributes and aria ids.accordion-<index><valid id>
open-firstSets the initial state of the first accordion item to openfalsetrue, false
paddingThe padding for evolv-accordion-header and evolv-accordion-details elements1.5rem<css length>
padding-tabletThe padding for evolv-accordion-header and evolv-accordion-details elements on screens over breakpoint in width2rem<css length>
title-boldThe bold option for the evolv-title elements in the accordion-headersfalsetrue, false
title-primitiveThe primitive option for evolv-title elements in the accordion-headersnullh1, h2, h3, h4, h5, p, span
title-sizeThe size of the evolv-title elements in the accordion-headersnullsmall, medium, large, xlarge, 2xlarge
track-nameThe name to use for Adobe Target tracking on accordion headers. Priority is first given to track-name set on the header, followed by track-name set on the accordion itself. If neither are supplied then the track-name will be generated from the idnull
typesingle only allows one accordion item to be open at a time. multi allows multiple items open simultaneouslymultisingle, multi

Body

Tag

<evolv-body size="medium">Our phones are faster than ever, the fastest phones you've ever seen.</evolv-body>

<evolv-body size="large">Your price comes to:
  <evolv-body size="large" bold="true" primitive="span">
    29.99
  </evolv-body>
</evolv-body>

Properties

NameDescriptionDefaultAccepts
primitiveThe html tag to use for the text elementpp, span, <html-tag>
sizeEither <size> and proportionate style of the textsmallmicro, small, medium, large
strikethroughWhether to cross out textfalsetrue, false
Size:
sizefont-familyfont-sizeline-heightfont-weight
microVerizon-NHG-eTX0.6875rem1rem400
smallVerizon-NHG-eTX0.75rem1rem400
mediumVerizon-NHG-eDS0.875rem1.125rem400
largeVerizon-NHG-eDS1rem1.25rem400

Button

Tag

<evolv-button use="secondary" width="50%">Click here</evolv-button>
<evolv-button size="small" breakpoint="768px">Continue</evolv-button>

Class

window.evolv.vds.Button

Properties

NameDescriptionDefaultAccepts
displayChanges the display property of the button.flexflex, block, inline-block
sizeRenders the button in the corresponding size.largelarge, small
text-colorThe color the text inside the button. If left blank sets automatically based on use and surfacenull<color-code>, <css-color>
useWhether the button face matches the color attribute (primary) or is transparent (secondary) button.primaryprimary, secondary
widthThe width for rendering the button.auto<number> or <css width>
disabledDisables button.falsetrue, false

Notes

Buttons do accept the breakpoint attribute but it only works in conjunction with size="small". Above the breakpoint the size will increase to large.

ButtonIcon

Tag

<!-- Can use <evolv-icon> built in icons -->
<evolv-button-icon name="close"></evolv-button-icon>

<!-- Or use custom SVG by omitting the 'name' attribute -->
<evolv-button-icon>
  <svg width="28" height="28" viewBox="0 0 28 28">
    <!-- fill="currentColor" allows the SVG to inherit the color of the parent element -->
    <circle cx="14" cy="14" r="14" fill="currentColor" />
  </svg>
</evolv-button-icon>

Class

window.evolv.vds.ButtonIcon

Properties

NameDescriptionDefaultAccepts
nameThe name of the iconemptySee Icon
sizeThe size of the iconsmallsmall, large Refer to Notes
titleThe title to be passed to the icon, visible to assistive technologies<name><string>

Notes

sizewidth and height
small1.25rem
large1.75rem

Tag

<evolv-carousel>
    <div class="tile"></div>
    <div class="tile"></div>
    <div class="tile"></div>
    <div class="tile"></div>
</evolv-carousel>

Properties

NameDescriptionDefaultAccepts
aspect-ratioThe default aspect ratio of tiles.4/5<fraction>, <decimal>
data-track-ignoreWhether to disable data tracking for button interactions.false<boolean>
disabledWhether to disable to the carousel, rendering contents normally.null<boolean>
gutterThe distance in px between tiles24<integer>
idThe id of the carousel, used for data-tracking and aria-tagsevolv-carousel-<index><string>
layoutThe number of tiles to display3<integer>
max-heightThe maximum height of the carousel<max-width> - 30<integer>
max-widthThe maxium width of the carousel1272<integer>
next-button-trackData track attribute for the next button`next button`
pagination-displayThe rule for displaying paginationpersistent???
peek???'standard'???
prev-button-trackData track attribute for the prev button`prev button`
scroll-trackData tracking for the pagination bar`progress bar`
tile-heightThe height of the tilenull???
tile-widthThe width of the tilenull???
track-paddingThe padding of the carousel track'24px 0'<css-lengths>

Notes

Carousel while in production is still a WIP.

  • accessibility affordances should be added to navigation
  • keyboard navigation should be added
  • gutter should accept any <css-length> not just an integer
  • layout may be obsolete
  • max-height calculation correct? should accept css length
  • max-width should accept css length
  • pagination-display not added
  • peek not added
  • tile-height not added
  • tile-width not added

Icon

Tag

<evolv-icon name="trash-can" size="medium"></evolv-icon>

Class

window.evolv.vds.Icon

Properties

NameDescriptionDefaultAccepts
nameThe name of the icon, leave blank to supply svg icon as contentnullRefer to Notes
colorThe text color of the iconinheritSee Properties
sizeThe font size of the icon, can be a preset size or any <css-size>smallmicro, small, medium, large, xlarge, <css-size> Refer to Notes
titleThe title to be passed to the icon, visible to assistive technologies<name><string>
typeWhether the icon size is standAlone, determined by the size attribute, or inline, inherited from text size of the parentstandAloneinline, standAlone

Notes

size only applies to icons with a type of standAlone.

sizewidth and height
micro0.75rem
small1rem
medium1.25rem
large1.5rem
xlarge1.75rem
<css-size><css-size>

If breakpoint is set, at or above the breakpoint width standAlone icons will change size.

sizewidth and height
micro1rem
small1.25rem
medium1.5rem
large1.75rem
xlarge2rem

Available icons:

  • close
  • down-caret
  • info
  • pencil
  • phone
  • phone-plan
  • phone-protection
  • right-arrow
  • trash-can
  • up-caret

Modal

Tag

const {html, render} = utils;

utils.app = {
  onClickProceed: (event) => console.log('Proceed'),
  onClickNoThanks: (event) => event.target.closest('evolv-modal').close(),
  openModal: () => document.body.insertAdjacentElement('beforeend', render(html`
    <evolv-modal>
      <evolv-modal-title>Special Offer</evolv-modal-title>
      <evolv-modal-body>10% off if you buy today</evolv-modal-body>
      <evolv-modal-footer>
        <evolv-button @click=${utils.app.onClickProceed}>Proceed</evolv-button>
        <evolv-button @click=${utils.app.onClickNoThanks}>No thanks</evolv-button>
      </evolv-modal-footer>
    </evolv-modal>`))
}

$mu('#productArea', 'product-area').inject(render(html`
  <evolv-button @click=${utils.app.openModal}>Open offer</evolv-button>
`), false).append()

Properties

NameDescriptionDefaultAccepts
close-button-locationWhether to display the default modal close button at the top or bottom.toptop, bottom
disable-trackDisables Adobe tracking on open and default close button.false<boolean>
durationThe duration in milliseconds of the transition animations400<integer>
focus-firstThe selector to which to assign initial focus.evolv-button, button<selector>
idThe unique id of the modal, used by Adobe trackingevolv-modal-<modal-index><string>
track-closeThe Adobe track name emitted when the default close button is clickedmodal close : <track-name><string>
track-nameThe track name to be used be used by open and close events<id><string>
track-openThe unique Adobe tracking event name emitted when the modal opensmodal open : <track-name><string>
widthThe width of the modal.35rem<css-length>
max-heightThe maximum height of the modal before it starts scrolling contents.70vh<css-length>

Notes

  • Modal may need data-tracking added, at least to the default close button

Scrollbar

The <evolv-scrollbar> component creates a scrollbar with click, drag, and keyboard interactions. It's currently only designed to work within the shadow DOM of other components but could be upgraded to a stand-alone component if there was a need for it. It applies styles to the parts.scrollArea of the parent component to enable scrolling and disable the default scrollbar.

Tag

<evolv-scrollbar></evolv-scrollbar>

Properties

NameDescriptionDefaultAccepts
hover-thicknessThe thickness of the scrollbar track on hover.4px<css-length>
lengthThe length of the scrollbar.<auto><css-length>
orientationWhether the scrollbar is vertical or horizontalverticalvertical, horizontal
scroll-areaA selector for another element inside the shadow DOM of the parent componentnull<css-selector>
thicknessThe thickness of the scrollbar track.4px<css-length>
thumbColorThe color of the scrollbar thumb.var(--color-gray-44)<css-color>
thumbHoverColorThe color of the scrollbar thumb on hover.var(--color-gray-20)<css-color>

Events

These are events dispatched by the scrollbar to be used by the parent component.

PartNameDescription
trackevolv:scrollbar-track-click-startFires when the handling of a track click event begins.
trackevolv:scrollbar-track-click-endFires when the handling of a track click event ends.
thumbevolv:scrollbar-thumb-mousedownFires with mousedown on the scrollbar thumb.
thumbevolv:scrollbar-thumb-mouseupFires with mouseup on the scrollbar thumb.

Tag

<evolv-text-link href="/target/url/" size="small" type="standAlone">Link</evolv-text-link>

Class

window.evolv.vds.TextLink

Properties

NameDescriptionDefaultAccepts
typeDetermines display layout of TextLink.inlineinline, standAlone
sizeRenders TextLink in corresponding size. Requires type="standAlone" to be set.largesmall, large, See Notes

Notes

sizefont-size
small0.75rem
large1rem

Title

Tag

<evolv-title bold="true">Bold small title</evolv-title>
<evolv-title size="medium" breakpoint="950px" primitive="h4">Medium title</evolv-title>

Class

window.evolv.vds.Title

Properties

NameDescriptionDefaultAccepts
colorThe text color of the titleinheritSee Properties
boldThe weight of the titlefalsetrue, false
sizeThe font size of the titlesmallxsmall, small, medium, large, xlarge, 2xlarge
primitiveThe base element for the titleAssigned based size See noteh1, h2, h3, h4, h5, h6, p, span
breakpointThe screen width at which to transition to a larger font size768px<css width>

Notes

The primitive attribute, if left blank, is assigned a default heading tag corresponding to its size:

sizeprimitive
xsmallh4
smallh3
mediumh2
largeh2
xlargeh1
2xlargeh1

Tooltip

Released in version 0.4.0

Tag

<evolv-tooltip content-title="Lorem ipusum">Nulla facilis eos dolorem totam est explicabo fuga. Cum magnam laudantium et itaque rerum sit. Amet laudantium nesciunt consequuntur nam accusamus odit. Sequi rerum et optio et aspernatur quam. Dolores nobis quos suscipit. Aut fugiat ipsam praesentium aliquid ut minima exercitationem illum. Natus explicabo rerum fugit in. Ut voluptatem nemo et. Nobis rem ut repellendus consectetur velit. Consequatur est aperiam praesentium illo facilis. Unde voluptas cumque et aliquid neque autem vel nam. Sit rerum aspernatur minima. Aut sequi vitae et natus est voluptas necessitatibus.</evolv-tooltip>

Properties

NameDescriptionDefaultAccepts
content-max-heightThe maximum height of the tooltip content12.75rem<css-height>
content-titleA title to be displayed above the tooltip content<string>
detect-touch-deviceWhether the modal mode of the tooltip appears based on touch-screen detection (true) or a breakpoint (false)true<boolean>
hover-delayThe duration in milliseconds the cursor must hover over the tooltip before the content appears400<number>
modal-durationThe duration in milliseconds of the modal fade-in and fade-out animations400<number>
sizeRenders the tooltip in the correpsponding size. Requires type to be standAlone.largelarge, small
typeWhether the tooltip button is inline, inherited from the text size of the parent, or standAlone, determined by the size attributeinlineinline, standAlone

FAQs

Package last updated on 28 Aug 2025

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