Coder Social home page Coder Social logo

trendingtechnology / vue-status-indicator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coderdiaz/vue-status-indicator

0.0 2.0 0.0 279 KB

A Vue.js component to show status indicator as colored dots.

Home Page: https://coderdiaz.me/vue-status-indicator/

License: MIT License

HTML 2.42% Vue 23.23% JavaScript 29.39% CSS 44.96%

vue-status-indicator's Introduction

<status-indicator/>

A Vue.js component to show status indicator as colored dots. Demo. This is a fork of status-indicator with a few changes for use with Vue.js.

Screenshot

Install

npm i vue-status-indicator

Usage

Import status-indicator.css in your CSS or JavaScript.

CSS:

@import 'vue-status-indicator'

JavaScript:

import 'vue-status-indicator/styles.css'

Import component status-indicator.

import StatusIndicator from 'vue-status-indicator'

HTML/Vue:

<template>
  <status-indicator active pulse></status-indicator>
</template>
<script>
  import StatusIndicator from 'vue-status-indicator'
  export default {
    components: {
      StatusIndicator
    }
  }
</script>

API

<status-indicator active|positive|intermediary|negative pulse></status-indicator>

You are able to customize the dot by CSS variables, default configuration is listed below.

:root {
  --status-indicator-size: 10px;
  --status-indicator-animation-duration: 2s;

  --status-indicator-color: rgb(216, 226, 233);
  --status-indicator-color-semi: rgba(216, 226, 233, .5);
  --status-indicator-color-transparent: rgba(216, 226, 233, 0);

  --status-indicator-color-active: rgb(0, 149, 255);
  --status-indicator-color-active-semi: rgba(0, 149, 255, .5);
  --status-indicator-color-active-transparent: rgba(0, 149, 255, 0);

  --status-indicator-color-positive: rgb(75, 210, 143);
  --status-indicator-color-positive-semi: rgba(75, 210, 143, .5);
  --status-indicator-color-positive-transparent: rgba(75, 210, 143, 0);

  --status-indicator-color-intermediary: rgb(255, 170, 0);
  --status-indicator-color-intermediary-semi: rgba(255, 170, 0, .5);
  --status-indicator-color-intermediary-transparent: rgba(255, 170, 0, 0);

  --status-indicator-color-negative: rgb(255, 77, 77);
  --status-indicator-color-negative-semi: rgba(255, 77, 77, .5);
  --status-indicator-color-negative-transparent: rgba(255, 77, 77, 0);
}

Development

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

Supported Browsers

Latest versions of Chrome/Firefox/Safari/IE/Opera.

LICENSE

MIT

vue-status-indicator's People

Contributors

coderdiaz avatar tnhu avatar

Watchers

 avatar  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.