RayCraftDocs
v1.0.3 raycraft.dev
On this page

Barcode

Free

Draws Code 128 (all printable ASCII, digits are packed in pairs), Code 39 (capitals, digits and - . $ / + % space), EAN-13, EAN-8 and UPC-A (the check digit is added, or verified when given) as plain SVG. ShowDownload adds buttons that save the barcode as SVG or PNG. Always dark on light so scanners read it in both themes.

Example

Barcode control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
FileNamestringFile name without extension for the download.
FormatBarcodeFormatCode128 (default), Code39, Ean13, Ean8 or UpcA.
HeightintBar height in SVG units (default 60).
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
ShowDownloadboolShows buttons that save the barcode as an SVG or PNG file.
ShowTextboolShows the encoded value under the bars.
StylestringInline style added to the root element.
ValuestringThe text or digits to encode.

Package

Barcode is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.