Skip to content

A Vue component for creating dashes

License

Notifications You must be signed in to change notification settings

nlitwin/vue-dashes

Repository files navigation

vue-dashes

Coverage Status

A Vue component for creating dashes of different sizes using SVG.

image

Installation

npm install --save vue-dashes

How to use

Include the plugin in your main.js file.

import VueDashes from 'vue-dashes'

Vue.use(VueDashes)

Then use the component

<vue-dashes
  color="papayawhip"
  :num-dashes="5"
  :dash-height="6"
  :dash-length="3"
  :space-length="2"
/>

Properties

Name Required Type Default Description
color false String '#000' hex code or HTML color name of the dashes
numDashes false Number 10 number of dashes
dashHeight false Number 1 the height of the dashes
dashLength false Number 1 the length of the dashes
spaceLength false Number 1 the length of the spaces between dashes

Contributing

Pull requests are welcomed and encouraged!

To develop locally:

npm start

Make sure linting passes and unit tests are added or updated before submitting your pull request:

npm run lint
npm run test:watch