Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-ribbon

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-ribbon

Vue component for GitHub ribbons

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.4K
decreased by-14.41%
Maintainers
1
Weekly downloads
 
Created
Source

vue-ribbon
Version License

Did you develop a Vue application hosted on GitHub? Add this Vue component for embedding a GitHub fork ribbon on it!


vue-ribbon is a Vue Single File Component implementing GitHub ribbons. It comes with a set of properties making the component customizable for your needs.

Properties

If you need to customize the ribbon look and feel, you can use the following optional properties.

NameDescriptionTypeDefault
textThe text to display on the ribbonStringvue-ribbon: check it out!
urlThe URL linkedStringhttps://flatmap.it/vue-ribbon
positionThe position of the ribbon. It can be right-top, right-bottom, left-top, left-bottomStringright-top
fixedIf defined, it makes the ribbon fixedBooleanfalse
colorDefines the background color of the ribbonString#364a5e

The color of the text is automatically detected by the component: for background color with a luma greater than 128 the text is white, otherwise black. See how it looks on this demo!

Installation

You can install vue-ribbon using npm:

npm install --save vue-ribbon

Alternatively, you can import vue-ribbon via <script> tag in the browser directly, avoiding the NPM installation:

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-ribbon"></script>

Usage

Once installed, it is easy to use it.

Importing the component

First, you need to import vue-ribbon in your files. You can do that in different ways. For example, it can be imported into a build process for use in full-fledged Vue applications:

import Ribbon from 'vue-ribbon';

export default {
  components: {
    Ribbon,
  },
  // rest of the component
}
Using the component

Once imported, you can use your component as follows:

<Ribbon/>

Credits

The inspiration for this component comes from github-fork-ribbon-css.

Contributing

This component can be improved both in features and performances. Please, help in doing it better!

Keywords

FAQs

Package last updated on 11 Feb 2019

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc