New to KendoReactStart a free 30-day trial

BarcodeProps
Premium

Represents the props of the KendoReact Barcode component.

NameTypeDefaultDescription

background?

string

"white"

The background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.

ts
<Barcode background="#ffffff" />

border?

Border

The border of the Barcode. Accepts an object implementing the Border interface.

ts
<Barcode border={{ color: "black", width: 2 }} />

checksum?

boolean

false

If set to true, the Barcode will display the checksum digit next to the value in the text area.

ts
<Barcode checksum={true} />

className?

string

Sets additional CSS classes to the component.

ts
<Barcode className="custom-barcode-class" />

color?

string

"black"

The color of the Barcode. Accepts a valid CSS color string, including hex and rgb.

ts
<Barcode color="#000000" />

height?

number

The height of the Barcode in pixels. The Barcode dimensions can also be set through regular CSS styling.

ts
<Barcode height={100} />

padding?

number | Padding

0

The padding of the Barcode. Accepts a numeric value or an object implementing the Padding interface.

ts
<Barcode padding={{ top: 10, bottom: 10, left: 5, right: 5 }} />

renderAs?

RenderMode

Sets the preferred rendering engine.

The supported values are:

  • "svg"—If available, renders the component as an inline svg element.
  • "canvas"—If available, renders the component as a canvas element.
ts
<Barcode renderAs="svg" />

style?

React.CSSProperties

The styles that are applied to the component.

ts
<Barcode style={{ backgroundColor: "lightgray" }} />

text?

BarcodeText

The Barcode text label configuration. Accepts an object implementing the BarcodeText interface.

ts
<Barcode text={{ visible: true, position: "bottom", color: "black" }} />

type

string

"Code39"

The symbology (encoding) the Barcode will use. Accepts a value of type BarcodeType or a custom string.

ts
<Barcode type="Code128" />

value

string | number

The value of the Barcode. Accepts a string or a number.

ts
<Barcode value="123456789" />

width?

number

The width of the Barcode in pixels. The Barcode dimensions can also be set through regular CSS styling.

ts
<Barcode width={200} />
Not finding the help you need?
Contact Support