Giter VIP home page Giter VIP logo

corner-notie's Introduction

corner-notie

NPM version NPM download

A corner tip utility.

Install

Hot-link the IIFE version in your web page directly, CSS is automatically included.

or via NPM:

npm i -S corner-notie

Usage

// if you are using webpack/browserify
import notie from 'corner-notie'

notie('hello world')

// default options
notie('', {
  type: 'info', // info | warning | success | danger
  autoHide: true,
  timeout: 3000,
  position: 'top-right',
  width: 240
})

Positions

top-right | top-left | top-center
bottom-right | bottom-left | bottom-center

Click to hide notie

When autoHide is set to be false, you can click on the notie to hide it. In this way you may not want to hide notie when clicking on a href. Set attribute notie-prevent on that element to prevent from being hidden by clicking there.

notie('hello <a notie-prevent href="/u/egoist">egoist</a>', {
  type: 'success',
  autoHide: false
})

Development

# build for webpack and browser
# run this each time you want to make new release
npm run build
# run gulp for development
npm run dev

License

MIT.

corner-notie's People

Contributors

egoist avatar npmcdn-to-unpkg-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

corner-notie's Issues

please add docs or update README

In the latest version, notie is not a function while new functions were added:

  • alert(type, message, seconds)
  • confirm(title, yes_text, no_text, yes_callback)
  • input(title, submit_text, cancel_text, type,...)

Please make it clear in the docs :)

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.