New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@zanichelli/albe-web-components

Package Overview
Dependencies
Maintainers
27
Versions
651
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zanichelli/albe-web-components

The Web Components implementation of Albe, the Zanichelli's design system.

latest
npmnpm
Version
19.2.3
Version published
Weekly downloads
2.7K
-23.19%
Maintainers
27
Weekly downloads
 
Created
Source

Zanichelli logo

Zanichelli - Web Components Library

Zanichelli's design system is widely documented on Zeroheight at this link.

Install

yarn add @zanichelli/albe-web-components

Start Library Development Server

yarn start

Create a component:

yarn generate component my-component

NB: component name must have a dash (-)

Run

yarn link

In the destination project folder run

yarn link @zanichelli/albe-web-components

Tests

Run all tests

yarn test

Run single test

yarn test --spec {componentPath}

Run e2e tests

yarn test.e2e

Linting and autofixing of the code style

There are some tools installed to help keeping uniformity of code style:

Install the related official extensions in your IDE to get live errors and warning while coding.

Run lint checks and auto-fix

Prettier check

yarn prettier-check

Prettier auto-format

yarn prettify

TypeScript lint check

yarn lint.eslint

CSS lint check

yarn lint.stylelint

TypeScript auto-fix

yarn lint-fix.eslint

CSS auto-fix

yarn lint-fix.stylelint

Release

In this repository we follow the Conventional Commits Specification and we use commit-and-tag-version to update the CHANGELOG.md when publishing a new version of the package to NPM.

commit-and-tag-version automatically detects the type of the update (patch, minor or major) following the Semantic Versioning specification.

Publish a release using GitHub actions

  • Access GitHub and log in as an authorized user
  • Go to the repository in the section New release version
  • Click on Run workflow (on the right in the blue box)
  • To release a latest version: choose master as the branch and select the version type (patch, minor, major) from the dropdown, then click on the Run workflow button.
  • To release a release candidate version specify the branch, the version tag and the version name, then click the button. In this case, the branch needs to be different from master, otherwise the action will publish a latest version anyway, ignoring version and tag names.

Plugins

Start Storybook:

# Start Storybook
yarn start-storybook

local development with Storybook comes with live reloading.

Build Storybook:

# Build the library
yarn build
# Build Storybook
yarn build-storybook

Build Library package

yarn build

Environment Support

  • Modern browsers
  • Chromium Edge and Safari 10 with polyfills
IE / Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
> 16.16> 48> 69> 10.0

Usage

CSS Custom Properties

The library provides a global css variables export. You can import the styles by ES6 import:

import "@zanichelli/albe-web-components/www/build/web-components-library.css";

or via link tag:

// using jsDelivr
<link
  type="text/css"
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/@zanichelli/albe-web-components/www/build/web-components-library.css"
/>

// using unpkg
<link
  type="text/css"
  rel="stylesheet"
  href="https://unpkg.com/@zanichelli/albe-web-components/www/build/web-components-library.css"
/>

Custom Elements

You can use the library by importing the custom elements from npm package:

import {defineCustomElements} from "@zanichelli/albe-web-components/loader";

defineCustomElements(window);

or via a script tag:

// using jsDelivr
<script src="https://cdn.jsdelivr.net/npm/@zanichelli/albe-web-components/dist/web-components-library/web-components-library.esm.js"></script>

// using unpkg
<script src="https://unpkg.com/@zanichelli/albe-web-components/dist/web-components-library/web-components-library.esm.js"></script>

Then use the relative tag as a usual component in your markup.

<section>
  <z-button variant="primary">Click me!</z-button>
</section>

Using React bindings

Albe's Web Components come with automatically generated React bindings. This means that you can use Web Components in a React application without the need to wrap component references, with full intellisense support thanks to TypeScript definition files for bindings.

Import components reference from the React submodule:

import React from "react";
import ReactDOM from "react-dom";
import "@zanichelli/albe-web-components/www/build/web-components-library.css";
import {defineCustomElements} from "@zanichelli/albe-web-components/loader";
import {ZButton} from "@zanichelli/albe-web-components/react";

defineCustomElements(window);

ReactDOM.render(<ZButton>Click me</ZButton>, document.getElementById("root"));

Component definition

Each component is structured as follows:

File nameDescription
index.tsxMarkup and UI logics
styles.cssStyles
index.spec.tsTests
index.mdxStorybook's markdown
index.stories.tsStorybook's CSF stories
readme.mdAuto-generated documentation

FAQs

Package last updated on 02 Apr 2026

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