0.1.40 • Published 2 years ago

@favian/favian-ui v0.1.40

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Favian UI

A UI Library based on Favian Design System.

For now, there is no organized documentation for component.

To see available components, render FaviShowcaseComponent in view.

<favi-showcase></favi-showcase>

Installation

npm install --save @favian/favian-ui

Import Styles

To use system styles, add stylePreprocessorOptions to your angular.json.

{
  "stylePreprocessorOptions": {
    "includePaths": [
      "node_modules/@favian/favian-ui/styles"
    ]
  }
}

In your styles.scss file, import favi-theme and call apply-theme() mixin to apply theme for UI.

@import "favi-theme";

@include apply-theme();

The apply-theme() mixin can retrieve map as $options parameter which contains following properties.

$options: (
  primary: $primary,
  secondary: $secondary,
  tertiary: $tertiary,
  quaternary: $quaternary,
  warning: $warning,
  error: $error,
  success: $success,
  light-foreground: $light-foreground,
  dark-foreground: $dark-foreground,
  light-background: $light-background,
  dark-background: $dark-background,
  light-contrast: $light-contrast,
  dark-contrast: $dark-contrast,
)
  • primary: Set the primary color of UI. Default is #FE4365.
  • secondary: Set the secondary color of UI. Default is #FC9D9A.
  • tertiary: Set the tertiary color of UI. Default is #F9CDAD.
  • quaternary: Set the quaternary color of UI. Default is #C8C8A9.
  • warning: Set the warning color of UI. Default is #F2B33D.
  • error: Set the error color of UI. Default is #C02942.
  • success: Set the success color of UI. Default is #27AE60.
  • light-foreground: Set the font color for light theme. Default is #444444.
  • dark-foreground: Set the font color for dark theme. #DDDDDD.
  • light-background: Set the background color for light theme. Default is #FFFFFF.
  • dark-background: Set the background color for dark theme. Default is #222222.
  • light-contrast: Set the highlight color for light theme. Default is #000000.
  • dark-contrast: Set the highlight color for dark theme. Default is #FFFFFF.

To apply your custom theme, you can provide all or partial properties.

// Apply theme by providing all properties.
@import "favi-theme";

@include apply-theme((
  primary: #FE4365,
  secondary: #FC9D9A,
  tertiary: #F9CDAD,
  quaternary: #C8C8A9,
  warning: #F2B33D,
  error: #C02942,
  success: #27AE60,
  light-foreground: #444444,
  dark-foreground: #DDDDDD,
  light-background: #FFFFFF,
  dark-background: #222222,
  light-contrast: #000000,
  dark-contrast: #FFFFFF,
));
// Apply theme by providing partial properties.
@import "favi-theme";

@include apply-theme((
  primary: #FE4365,
  secondary: #FC9D9A,
));

App

It is highly recommended to wrap your application in FaviAppComponent.

The FaviAppComponent do following things:

  • Wrap your application with width: 100%, height: 100%, position: absolute, overflow: auto container.
  • Create outlets of Toast and Overlay. If you don't use FaviAppComponent, both have to imported manually.

In your app.component.html:

<favi-app>
  <!-- Your Application content in here. -->
</favi-app>
0.1.30

2 years ago

0.1.31

2 years ago

0.1.32

2 years ago

0.1.10

2 years ago

0.1.33

2 years ago

0.1.11

2 years ago

0.1.34

2 years ago

0.1.12

2 years ago

0.1.35

2 years ago

0.1.13

2 years ago

0.1.36

2 years ago

0.1.14

2 years ago

0.1.37

2 years ago

0.1.15

2 years ago

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.40

2 years ago

0.1.38

2 years ago

0.1.16

2 years ago

0.1.8

2 years ago

0.1.39

2 years ago

0.1.17

2 years ago

0.1.7

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago