🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

au-cardigan

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

au-cardigan

A robust set of UI components for Aurelia 2

latest
Source
npmnpm
Version
0.0.27
Version published
Maintainers
1
Created
Source

Cardigan UI

A robust set of UI components for Aurelia 2.

Installation

npm install au-cardigan

Usage

Import the configuration object and register it with Aurelia during app boostrap. The following would usually go inside of main.ts / main.js.

import { CardiganConfiguration } from 'au-cardigan';

Aurelia
  .register(
    CardiganConfiguration,
  )
  .app(App)
  .start(

Components

Cardigan features a small, but growing number of components.

  • <au-button> wraps the native <button> component
  • <au-heading> wraps the native heading elements, h1 through to h6
  • <au-image> wraps the native <img> element, but also offers support for scaling, srcSet and more
  • <au-modal> a lightweight modal implementation
  • <au-select> wraps the native select element

Styling Components

Styling components uses CSS Shadow Parts which allow you complete stylistic control over each component used. Each component in this library exposes a part name which you can then reference in your CSS styles.

For example, to style a primary button in your app you can reference the element and the primary style part like this:

au-button::part(primary) {
    background: blue;
}

Similarly, if you have added a class to your button, reference the class instead:

.my-button::part(primary) {
    background: blue;
}

FAQs

Package last updated on 18 Jul 2023

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