Socket
Book a DemoInstallSign in
Socket

@novicell/message-bar

Package Overview
Dependencies
Maintainers
10
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@novicell/message-bar

[![npm version](https://img.shields.io/npm/v/@novicell/message-bar)](https://www.npmjs.com/package/@novicell/message-bar) ![npm](https://img.shields.io/npm/dw/@novicell/message-bar)

0.0.10
latest
npmnpm
Version published
Maintainers
10
Created
Source

npm version npm

@Novicell/message-bar

Quickly drop in a status-bar in the top/bottom of a page if you have an important message to share.

Demo

Link to codepen: https://codepen.io/Novicell/pen/ZEGoXqe

Installation

There is multiple ways to install the component, you can either install it as a NPM package, or you can include it directly from a CDN.

NPM

npm install @novicell/message-bar

Then you can include the package in your main.js or similar depending on your project accordingly

import '@novicell/message-bar';

CDN

<script src="https://cdn.jsdelivr.net/npm/@novicell/message-bar/dist/message-bar.js"></script>

or for a specific version

<script src="https://cdn.jsdelivr.net/npm/@novicell/message-bar@0.0.3/dist/message-bar.js"></script>

Usage

To use the application simply drop in the html tag

<message-bar background-color="#FF8387"
             href="https://google.com"
             position="top"
             color="#fff"
             message="Breaking news: We are closed due to unforeseen circumstances"></message-bar>

Options

The component has multiple properties that you can use to adjust the look and feel as well as the message of the message bar.

  • position: - Decides if the bar should sit at the top or the bottom of the page (Default: "top")
  • background-color - Decides the background color of the bar, can be hex, rgba, etc (Default: "#FF8387")
  • color - Decides the color of text the bar, can be hex, rgba, etc (Default: "#FFF")
  • message - Sets the text within the bar (Default: "This is your message.")
  • href - Sets the link of the button (Default: "") (Button wont be shown if no link is provided)
  • button-text - Sets the text within the button (Default: "Read more")
  • target - Decides if the link should open in the current page or a new window etc. (Default: "_self")
  • fixed - Decides if the bar should be positioned fixed or relative (Default: "fixed")

FAQs

Package last updated on 23 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.