0.0.27 • Published 10 months ago

au-cardigan v0.0.27

Weekly downloads
2
License
MIT
Repository
github
Last release
10 months ago

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;
}
0.0.27

10 months ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.26

2 years ago

0.0.20

2 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago