npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@briza/air

v0.1.20

Published

The building blocks for a custom InsureTech experience

Downloads

63

Readme

Briza Air

The building blocks for a custom insuretech experience

v.0.1.20

What is it?

Briza Air is a web components library designed to help developers create the best experience for merchants who use Briza API. It is framework-agnostic, which means it is not dependent or restricted to any one framework for implementation.

Our design system helps agencies, developers and designers work together to build great insuretech experiences. It has been built using the principles of Atomic Design.

Using the web components

Installation

Run the following command using npm:

npm install @briza/air --save

If you prefer Yarn, use the following command instead:

yarn add @briza/air

Usage

Integrating the Briza Air components library to a project without a JavaScript framework is straightforward.

Import

Import the library to your module and define custom elements:


NOTE

When defineCustomElements() is called, it will define every component in the bundle. However, it does not run automatically and it will not be called if it is not imported and executed.


import { defineCustomElements } from '@briza/air'
defineCustomElements()

Render

Render Briza Air Button element in the DOM:

<air-button type="button">Click me!</air-button>

NOTE: The air-button component example demonstrates how to assign HTML attributes and pass data as a slot. Render Briza Air Select element in the DOM:

<air-select></air-select>

Props

You can find prop interfaces on the documentation page under each component's section usage.

const airSelectElement = document.querySelector('air-select');
airSelectElement.options = {
  { value: '1', label: 'Item 1' },
  { value: '2', label: 'Item 2' },
  { value: '3', label: 'Item 3' },
  { value: '4', label: 'Item 4' },
};

Events

Briza Air provides custom events with the prefix air-.

const airSelectElement = document.querySelector('air-select')
airSelectElement.addEventListener('air-change', function (event) {
  console.log('Emitted data: ', event.detail)
})

Styling and customization

Theming

To speed up customizing Briza Air's global look and feel to fit your visual identity, Briza Air provides a theme file housing global variables affecting color, typography, and spacing. Download this theme file, edit (editing overwrites the variables) and include it in your project.

Usage

You can use these theme stylesheets in the following ways.

HTML Embed

Include your CSS file (available in the application styles folder) into index.html.

<link rel="stylesheet" href="/styles/theme.css" />
Import into module

Import into a required module.

import '/styles/theme.css'

Component customization

Briza Air provides the ability to customize component properties such as size (width, height), spacing (margin, padding), typography, colors. You can download the collection of each file.


NOTE

Single CSS files for each component can be downloaded at their respective component page.


Every component has a list of variables that can be defined and overwritten to match your brand guidelines. You should include these styles in your application's main CSS file.

:root {
  --air-color-white: #ffffff;
  --air-color-accent: #8a2be2;
  --air-color-eclipse: #3a3a3a;
  --air-color-success: #5ec075;
  --air-color-warning: #ffdf52;
  --air-color-error: #e55451;
  --air-body-color: var(--air-color-eclipse);
  --air-body-font-family: Inter;
  --air-body-font-size: 1rem;
  ...;
}

Refer to documentation, for more information on using CSS variables.

Useful links