Coder Social home page Coder Social logo

ad-library's Introduction

AD Library

website

Simple angular library :

  • Button slide : show simple icon, on hover : show icon + text
  • Button switch : ios like button switch
<iframe src="https://stackblitz.com/edit/ad-library?embed=1&file=src/app/app.component.html&hideExplorer=1&hideNavigation=1&view=preview" style="width:100%;height:330px;border:none;"></iframe>

Using ad-library in a project

  1. Install the library : npm i ad-library
  2. Import the module :
import { AdLibraryModule } from 'ad-library';
@NgModule({
imports: [ ..., AdLibraryModule ], ...
  1. (if you want to use TabsComponent) Import the module :
import { AdTabsModule } from 'ad-library';
@NgModule({
imports: [ ..., AdTabsModule ], ...
  1. (optional) import an icon library like fontawesome (npm i @fortawesome/fontawesome-free)
  2. Play with the component :-)

<ad-button-slide icon="fas fa-trash" label="Delete this" background="red"></ad-button-slide>

Properties

Button Slide

  • ad-button-slide - (AdButtonSlideComponent) - button slide component object.

Parameters supported by this object:

  • icon: string; - icon class, eg. 'fa fa-trash'
  • label: string; - label displayed on hover
  • background: string = '#aaa'; - css background color
  • foreground: string = 'white'; - css font color
  • backgroundOver: string = null; - css background color when mouseOver, if no value given : backgroundOver = background
  • foregroundOver: string = null; - css font color when mouseOver, if no value given : foregroundOver = foreground
  • mini: boolean = false; - boolean to make the button tiny

Button Switch

  • ad-button-switch - (AdButtonSwitchComponent) - ios like button switch component object.

Parameters supported by this object:

  • theme: string = 'flip'; - choose the button switch theme, can be flip or switch
  • labelOn: string = ''; - for theme flip : label displayed when selected
  • labelOff: string = ''; - for theme flip : label displayed when not selected
  • iconOn: string = ''; - for theme flip : icon displayed when selected
  • iconOff: string = ''; - for theme flip : icon displayed when selected
  • ngModel: value to bind

Example

<iframe src="https://stackblitz.com/edit/ad-library?embed=1&file=src/app/app.component.html&hideNavigation=1&view=preview" style="width:100%;height:400px;border:none;"></iframe>

Tabs

  • ad-tabs-component - (AdTabsComponent) - responsive tabs.

Test library

clone this project and run 'npm i && npm start'

License

MIT License

Author

Adrien Dessilly

ad-library's People

Contributors

adessilly avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.