saionaro / notefer

The lightweight notifications system UI

Home Page:https://saionaro.github.io/notefer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

notefer npm version CI minzip license

The lightweight notifications system UI

DEMO

Getting started

Installation

First of all install the package:

NPM: npm install notefer

Yarn: yarn add notefer

Import and usage

Then you can import required things and send notifications

import { pushNotification } from "notefer";
import "notefer/lib/style.css";

pushNotification({
  title: "Direct Message",
  text: "Alex: How are you?",
});

Options

pushNotification(notification: Notification | Notification[]): void

interface Notification {
  title: string; // notification title
  text: string; // notification body

  lifetime?: number; // how long notification box should exist on the screen
  className?: string; // additional class name, applied to notif body
}

About

The lightweight notifications system UI

https://saionaro.github.io/notefer/


Languages

Language:TypeScript 58.6%Language:JavaScript 17.8%Language:CSS 14.7%Language:HTML 8.8%