renderAs String (default: "svg")

Sets the preferred rendering engine. If it is not supported by the browser, the Barcode will switch to the first available mode.

The supported values are:

  • "canvas" - renders the widget as a Canvas element, if available.
  • "svg" - renders the widget as inline SVG document, if available

Example - Render as SVG, if supported

<div id="barcode"></div>
  width: 300,
  renderAs: "svg"
In this article