
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@evolv-delivery/vds-components
Advanced tools
A library of web components for rapid experiment development. Built to be compatible with the Verizon Design System 3.0
A library of web components for experiments.
Script | Description |
---|---|
npm run build | Builds dist/../index.js files |
npm run watch | Automatically builds on save of src/index.js |
npm run serve | Hosts dist folder on port 4444 |
npm run dev | Watch and serve |
npm run ship | Build and publish to npm |
npm start | Same as npm run dev |
Verizon Design System components are automatically available anywhere the integration is active.
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);
})();
The core component from which all other components inherit. This gives the following properties to all components:
Name | Description | Default | Accepts |
---|---|---|---|
breakpoint | The screensize to display tablet and desktop styles. Can be set globally by setting window.evolv.vds.breakpoint | 768px | <css-size> |
color | The text color of the component | inherit | inherit , <color-code> , <css-color> |
css | A stylesheet to add to the component. Selectors are required, @media statements are valid. | null | <css-stylesheet> |
surface | Whether to style the component for a light or dark background | light | light , dark |
Option | Hex |
---|---|
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>
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 to be injected into the style tag.
Example:
<evolv-button css=".button {background-color: var(--color-red); color: var(--color-gray-95)}">Button<>
<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>
Name | Description | Default | Accepts |
---|---|---|---|
disable-track | Whether to disable Adobe Target tracking | false | true , false |
breakpoint | Used by evolv-title and evolv-button-icon elements to increase size above a certain screen width | 768px | <css length> |
duration | Sets the animation duration for opening evolv-details panels | 0.33s | <css duration> |
handle-align | Whether the accordion handle is aligned left or right | left | left , right |
icon-size | The size of the evolv-button-icon element, | Based on title-size if present, otherwise small | small , large |
id | A name for the accordion, used by data-track attributes and aria ids. | accordion-<index> | <valid id> |
open-first | Sets the initial state of the first accordion item to open | false | true , false |
padding | The padding for evolv-accordion-header and evolv-accordion-details elements | 1.5rem | <css length> |
padding-tablet | The padding for evolv-accordion-header and evolv-accordion-details elements on screens over breakpoint in width | 2rem | <css length> |
title-bold | The bold option for the evolv-title elements in the accordion-headers | false | true , false |
title-primitive | The primitive option for evolv-title elements in the accordion-headers | null | h1 , h2 , h3 , h4 , h5 , p , span |
title-size | The size of the evolv-title elements in the accordion-headers | null | small , medium , large , xlarge , 2xlarge |
track-name | The 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 id | null | |
type | single only allows one accordion item to be open at a time. multi allows multiple items open simultaneously | multi | single , multi |
<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>
Name | Description | Default | Accepts |
---|---|---|---|
primitive | The html tag to use for the text element | p | p , span , <html-tag> |
size | Either <size> and proportionate style of the text | small | micro , small , medium , large |
strikethrough | Whether to cross out text | false | true , false |
size | font-family | font-size | line-height | font-weight |
---|---|---|---|---|
micro | Verizon-NHG-eTX | 0.6875rem | 1rem | 400 |
small | Verizon-NHG-eTX | 0.75rem | 1rem | 400 |
medium | Verizon-NHG-eDS | 0.875rem | 1.125rem | 400 |
large | Verizon-NHG-eDS | 1rem | 1.25rem | 400 |
<evolv-button use="secondary" width="50%">Click here</evolv-button>
<evolv-button size="small" breakpoint="768px">Continue</evolv-button>
window.evolv.vds.Button
Name | Description | Default | Accepts |
---|---|---|---|
display | Changes the display property of the button. | flex | flex , block , inline-block |
size | Renders the button in the corresponding size. | large | large , small |
text-color | The color the text inside the button. If left blank sets automatically based on use and surface | null | <color-code> , <css-color> |
use | Whether the button face matches the color attribute (primary ) or is transparent (secondary ) button. | primary | primary , secondary |
width | The width for rendering the button. | auto | <number> or <css width> |
disabled | Disables button. | false | true , false |
breakpoint
attribute but it only works in conjunction with size="small"
. Above the breakpoint
the size will increase to large
.<!-- 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>
window.evolv.vds.ButtonIcon
Name | Description | Default | Accepts |
---|---|---|---|
name | The name of the icon | empty | See Icon |
size | The size of the icon | small | small , large Refer to Notes |
title | The title to be passed to the icon, visible to assistive technologies | <name> | <string> |
size | width and height |
---|---|
small | 1.25rem |
large | 1.75rem |
<evolv-carousel>
<div class="tile"></div>
<div class="tile"></div>
<div class="tile"></div>
<div class="tile"></div>
</evolv-carousel>
Name | Description | Default | Accepts |
---|---|---|---|
aspect-ratio | The default aspect ratio of tiles. | 4/5 | <fraction> , <decimal> |
data-track-ignore | Whether to disable data tracking for button interactions. | false | <boolean> |
disabled | Whether to disable to the carousel, rendering contents normally. | null | <boolean> |
gutter | The distance in px between tiles | 24 | <integer> |
id | The id of the carousel, used for data-tracking and aria-tags | evolv-carousel-<index> | <string> |
layout | The number of tiles to display | 3 | <integer> |
max-height | The maximum height of the carousel | <max-width> - 30 | <integer> |
max-width | The maxium width of the carousel | 1272 | <integer> |
next-button-track | Data track attribute for the next button | `next button | ` |
pagination-display | The rule for displaying pagination | persistent | ??? |
peek | ??? | 'standard' | ??? |
prev-button-track | Data track attribute for the prev button | `prev button | ` |
scroll-track | Data tracking for the pagination bar | `progress bar | ` |
tile-height | The height of the tile | null | ??? |
tile-width | The width of the tile | null | ??? |
track-padding | The padding of the carousel track | '24px 0' | <css-lengths> |
Carousel while in production is still a WIP.
gutter
should accept any <css-length>
not just an integer
layout
may be obsoletemax-height
calculation correct? should accept css lengthmax-width
should accept css lengthpagination-display
not addedpeek
not addedtile-height
not addedtile-width
not added<evolv-icon name="trash-can" size="medium"></evolv-icon>
window.evolv.vds.Icon
Name | Description | Default | Accepts |
---|---|---|---|
name | The name of the icon, leave blank to supply svg icon as content | null | Refer to Notes |
color | The text color of the icon | inherit | See Properties |
size | The font size of the icon, can be a preset size or any <css-size> | small | micro , small , medium , large , xlarge , <css-size> Refer to Notes |
title | The title to be passed to the icon, visible to assistive technologies | <name> | <string> |
type | Whether the icon size is standAlone , determined by the size attribute, or inline , inherited from text size of the parent | standAlone | inline , standAlone |
size
only applies to icons with a type
of standAlone
.
size | width and height |
---|---|
micro | 0.75rem |
small | 1rem |
medium | 1.25rem |
large | 1.5rem |
xlarge | 1.75rem |
<css-size> | <css-size> |
If breakpoint
is set, at or above the breakpoint width standAlone
icons will change size.
size | width and height |
---|---|
micro | 1rem |
small | 1.25rem |
medium | 1.5rem |
large | 1.75rem |
xlarge | 2rem |
Available icons:
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()
Name | Description | Default | Accepts |
---|---|---|---|
close-button-location | Whether to display the default modal close button at the top or bottom. | top | top , bottom |
disable-track | Disables Adobe tracking on open and default close button. | false | <boolean> |
duration | The duration in milliseconds of the transition animations | 400 | <integer> |
focus-first | The selector to which to assign initial focus. | evolv-button, button | <selector> |
id | The unique id of the modal, used by Adobe tracking | evolv-modal-<modal-index> | <string> |
track-close | The Adobe track name emitted when the default close button is clicked | modal close : <track-name> | <string> |
track-name | The track name to be used be used by open and close events | <id> | <string> |
track-open | The unique Adobe tracking event name emitted when the modal opens | modal open : <track-name> | <string> |
width | The width of the modal. | 35rem | <css-length> |
max-height | The maximum height of the modal before it starts scrolling contents. | 70vh | <css-length> |
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.
<evolv-scrollbar></evolv-scrollbar>
Name | Description | Default | Accepts |
---|---|---|---|
hover-thickness | The thickness of the scrollbar track on hover. | 4px | <css-length> |
length | The length of the scrollbar. | <auto> | <css-length> |
orientation | Whether the scrollbar is vertical or horizontal | vertical | vertical , horizontal |
scroll-area | A selector for another element inside the shadow DOM of the parent component | null | <css-selector> |
thickness | The thickness of the scrollbar track. | 4px | <css-length> |
thumbColor | The color of the scrollbar thumb. | var(--color-gray-44) | <css-color> |
thumbHoverColor | The color of the scrollbar thumb on hover. | var(--color-gray-20) | <css-color> |
These are events dispatched by the scrollbar to be used by the parent component.
Part | Name | Description |
---|---|---|
track | evolv:scrollbar-track-click-start | Fires when the handling of a track click event begins. |
track | evolv:scrollbar-track-click-end | Fires when the handling of a track click event ends. |
thumb | evolv:scrollbar-thumb-mousedown | Fires with mousedown on the scrollbar thumb. |
thumb | evolv:scrollbar-thumb-mouseup | Fires with mouseup on the scrollbar thumb. |
<evolv-text-link href="/target/url/" size="small" type="standAlone">Link</evolv-text-link>
window.evolv.vds.TextLink
Name | Description | Default | Accepts |
---|---|---|---|
type | Determines display layout of TextLink. | inline | inline , standAlone |
size | Renders TextLink in corresponding size. Requires type="standAlone" to be set. | large | small , large , See Notes |
size | font-size |
---|---|
small | 0.75rem |
large | 1rem |
<evolv-title bold="true">Bold small title</evolv-title>
<evolv-title size="medium" breakpoint="950px" primitive="h4">Medium title</evolv-title>
window.evolv.vds.Title
Name | Description | Default | Accepts |
---|---|---|---|
color | The text color of the title | inherit | See Properties |
bold | The weight of the title | false | true , false |
size | The font size of the title | small | xsmall , small , medium , large , xlarge , 2xlarge |
primitive | The base element for the title | Assigned based size See note | h1 , h2 , h3 , h4 , h5 , h6 , p , span |
breakpoint | The screen width at which to transition to a larger font size | 768px | <css width> |
The primitive
attribute, if left blank, is assigned a default heading tag corresponding to its size
:
size | primitive |
---|---|
xsmall | h4 |
small | h3 |
medium | h2 |
large | h2 |
xlarge | h1 |
2xlarge | h1 |
Released in version 0.4.0
<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>
Name | Description | Default | Accepts |
---|---|---|---|
content-max-height | The maximum height of the tooltip content | 12.75rem | <css-height> |
content-title | A title to be displayed above the tooltip content | <string> | |
detect-touch-device | Whether the modal mode of the tooltip appears based on touch-screen detection (true ) or a breakpoint (false ) | true | <boolean> |
hover-delay | The duration in milliseconds the cursor must hover over the tooltip before the content appears | 400 | <number> |
modal-duration | The duration in milliseconds of the modal fade-in and fade-out animations | 400 | <number> |
size | Renders the tooltip in the correpsponding size. Requires type to be standAlone . | large | large , small |
type | Whether the tooltip button is inline , inherited from the text size of the parent, or standAlone , determined by the size attribute | inline | inline , standAlone |
FAQs
A library of web components for rapid experiment development. Built to be compatible with the Verizon Design System 3.0
We found that @evolv-delivery/vds-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.