svelte-barcode
v2.0.0
Published
A light-weight and high-performance component to generate barcode for Svelte.
Downloads
413
Readme
svelte-barcode
A light-weight and high-performance component to generate barcode for Svelte.
🔧 Install
svelte-barcode is available on npm. It can be installed with the following command:
npm install svelte-barcode --save
svelte-barcode is available on yarn as well. It can be installed with the following command:
yarn add svelte-barcode --save
Note: Install as a dev dependency ( npm install svelte-barcode -D
) ( yarn add svelte-barcode --dev
) if using Sapper to avoid a SSR error.
💡 Usage
<script>
import Barcode from 'svelte-barcode';
</script>
<Barcode
value={'svelte-barcode'}
elementTag={'canvas'}
options={{
format: 'CODE128',
width: 2,
height: 100,
text: '',
textAlign: 'center',
textPosition: 'bottom',
textMargin: 2,
fontSize: 20,
background: '#ffffff',
lineColor: '#000000',
}}
/>
props
options
❗ Issues
If you think any of the svelte-barcode
can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.
🌟 Contribution
We'd love to have your helping hand on contributions to svelte-barcode
by forking and sending a pull request!
Your contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)
How to contribute:
- Open pull request with improvements
- Discuss ideas in issues
- Spread the word
- Reach out with any feedback