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

svelte-barcode

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-barcode - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

2

package.json
{
"name": "svelte-barcode",
"version": "1.1.0",
"version": "2.0.0",
"description": "A light-weight and high-performance component to generate barcode for Svelte.",

@@ -5,0 +5,0 @@ "author": "Bunlong",

@@ -21,3 +21,3 @@ # svelte-barcode

**Note:** Install as a dev dependency ( `npm install svelte-barcode -D` ) ( `yarn add svelte-select --dev` ) if using [Sapper](https://sapper.svelte.dev) to avoid a SSR error.
**Note:** Install as a dev dependency ( `npm install svelte-barcode -D` ) ( `yarn add svelte-barcode --dev` ) if using [Sapper](https://sapper.svelte.dev) to avoid a SSR error.

@@ -32,8 +32,20 @@ ## 💡 Usage

<Barcode
value={"svelte-barcode"}
elementTag={"canvas"}
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
## props

@@ -60,4 +72,4 @@ <table>

<td>elementTag</td>
<td>"img" | "canvas" | "svg"</td>
<td>"img"</td>
<td>'img' | 'canvas' | 'svg'</td>
<td>'img'</td>
<td>❌</td>

@@ -67,2 +79,25 @@ <td></td>

<tr>
<td>options</td>
<td>any</td>
<td></td>
<td>❌</td>
<td>Options to generate.</td>
</tr>
</tbody>
</table>
## options
<table>
<thead>
<tr>
<th>Options</th>
<th>Type</th>
<th>Default</th>
<th>Require</th>
<th>Description</th>
</tr>
<thead>
<tbody>
<tr>
<td>format</td>

@@ -105,3 +140,3 @@ <td>string?</td>

<td>string?</td>
<td><code>""</code></td>
<td><code>''</code></td>
<td>❌</td>

@@ -113,3 +148,3 @@ <td>With fontOptions you can add bold or italic text to the barcode.</td>

<td>string?</td>
<td><code>"monospace"</code></td>
<td><code>'monospace'</code></td>
<td>❌</td>

@@ -121,3 +156,3 @@ <td>Define the font used for the text in the generated barcode. This can be any default font or a font defined by a @font-face rule.</td>

<td>string?</td>
<td><code>"center"</code></td>
<td><code>'center'</code></td>
<td>❌</td>

@@ -129,3 +164,3 @@ <td>Set the horizontal alignment of the text. Can be <code>left</code> / <code>center</code> / <code>right</code>.</td>

<td>string?</td>
<td><code>"bottom"</code></td>
<td><code>'bottom'</code></td>
<td>❌</td>

@@ -151,3 +186,3 @@ <td>Set the vertical position of the text. Can be <code>bottom</code> / <code>top</code>.</td>

<td>string?</td>
<td><code>"#ffffff"</code></td>
<td><code>'#ffffff'</code></td>
<td>❌</td>

@@ -159,3 +194,3 @@ <td>Set the background of the barcode.</td>

<td>string?</td>
<td><code>"#000000"</code></td>
<td><code>'#000000'</code></td>
<td>❌</td>

@@ -162,0 +197,0 @@ <td>Set the color of the bars and the text.</td>

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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