Skip to content

feat(etiket): Add barcode and QR code components#92

Open
ryu-man wants to merge 1 commit intomainfrom
feat/etiket-component
Open

feat(etiket): Add barcode and QR code components#92
ryu-man wants to merge 1 commit intomainfrom
feat/etiket-component

Conversation

@ryu-man
Copy link
Copy Markdown
Contributor

@ryu-man ryu-man commented Apr 7, 2026

📱 Etiket Barcode Components

Add comprehensive barcode and QR code generation components powered by the etiket library.

New Components

1D Barcodes

  • EtiketBarcode - Generate various 1D barcode formats:
    • CODE128, CODE39, EAN-13, EAN-8
    • UPC-A, UPC-E, ITF-14
    • Codabar, MSI, Pharmacode

2D Codes

  • EtiketQRCode - QR code generation with error correction
  • EtiketDataMatrix - Data Matrix codes with GS1 support
  • EtiketPDF417 - PDF417 barcodes with configurable columns
  • EtiketAztec - Aztec codes with compact variant support

Utilities

  • EtiketIrRenderer - Intermediate representation renderer for custom rendering

Features

TypeScript Support - Full type definitions for all components
SVG Output - Clean, scalable vector graphics
Customizable - Control colors, sizes, error correction, and more
GS1 Ready - Built-in GS1 DataMatrix encoding
Error Correction - Configurable EC levels for PDF417 and Aztec
Compact Variants - Space-efficient compact modes
Storybook Demos - Interactive examples for all components

Usage Examples

<script>
  import { EtiketBarcode, EtiketQRCode } from '$lib/components/etiket';
</script>

<!-- 1D Barcode -->
<EtiketBarcode value="123456789012" type="EAN13" />

<!-- QR Code -->
<EtiketQRCode value="https://example.com" />

<!-- Data Matrix with GS1 -->
<EtiketDataMatrix value="01034531200000111719112510ABCD1234" gs1 />

<!-- PDF417 -->
<EtiketPDF417 value="PDF417 DATA" columns={5} ecLevel={2} />

API

All components accept:

  • value: String data to encode
  • class: CSS classes for styling
  • Component-specific options (error correction, size, etc.)

See TypeScript definitions in types.ts for full API details.

Files Added

  • src/lib/components/etiket/barcode.svelte
  • src/lib/components/etiket/qr-code.svelte
  • src/lib/components/etiket/datamatrix.svelte
  • src/lib/components/etiket/pdf417.svelte
  • src/lib/components/etiket/aztec.svelte
  • src/lib/components/etiket/ir-renderer.svelte
  • src/lib/components/etiket/types.ts
  • src/lib/components/etiket/index.ts
  • src/lib/components/etiket/etiket.stories.svelte

Integration

Exported from main components index:

export * from './etiket';

Use Cases

  • 📦 Product labels - EAN/UPC barcodes
  • 🎫 Tickets - QR codes for scanning
  • 📋 Inventory - Data Matrix for tracking
  • 📄 Documents - PDF417 for data-rich codes
  • 🏷️ Asset tags - Aztec codes for compact encoding

Build Status

✅ All builds pass (~12-24s)

Add comprehensive barcode generation components powered by the 'etiket' library:

Components:
- EtiketBarcode: 1D barcodes (CODE128, EAN, UPC, etc.)
- EtiketQRCode: QR code generation
- EtiketDataMatrix: Data Matrix 2D codes
- EtiketPDF417: PDF417 barcodes
- EtiketAztec: Aztec codes
- EtiketIrRenderer: Intermediate representation renderer

Features:
✅ Full TypeScript support
✅ Customizable rendering options
✅ SVG-based output
✅ GS1 support for DataMatrix
✅ Error correction controls
✅ Compact variants
✅ Storybook demos

All components integrate seamlessly with the svelte-atoms design system.
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for statuesque-boba-0fb888 failed.

Name Link
🔨 Latest commit 3601c91
🔍 Latest deploy log https://app.netlify.com/projects/statuesque-boba-0fb888/deploys/69d5837c3f20f20008b0bd4a

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for sacore failed.

Name Link
🔨 Latest commit 3601c91
🔍 Latest deploy log https://app.netlify.com/projects/sacore/deploys/69d5837c081b0c0008fc90a5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant