@progress/kendo-angular-barcodes
Version:
Kendo UI Angular Barcodes
110 lines (109 loc) • 4.2 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { ElementRef, NgZone, Renderer2 } from '@angular/core';
import { Barcode, BarcodeOptions } from '@progress/kendo-charts';
import { BaseComponent } from './base.component';
import { BarcodeText, BarcodeType, Border, Padding, RenderMode } from './chart-types';
import * as i0 from "@angular/core";
/**
* Represents the [Kendo UI Barcode component for Angular](slug:overview_barcode_barcodes).
*
* Use this component to display a barcode in your Angular application.
*
* @example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-app',
* template: `
* <kendo-barcode type="EAN8" value="1234567">
* </kendo-barcode>
* `
* })
* export class AppComponent {
* }
* ```
*/
export declare class BarcodeComponent extends BaseComponent {
protected element: ElementRef;
protected renderer: Renderer2;
protected ngZone: NgZone;
/**
* Sets the background color of the Barcode. Accepts any valid CSS color string, such as hex or rgb.
*
* @default "white"
*/
background?: string;
/**
* Configures the border of the Barcode.
*/
border?: Border;
/**
* Shows the checksum digit next to the value in the text area when set to `true`.
*
* @default false
*/
checksum?: boolean;
/**
* Sets the color of the Barcode. Accepts any valid CSS color string, such as hex or rgb.
*
* @default "black"
*/
color?: string;
/**
* Sets the height of the Barcode in pixels.
*
* You can also set the Barcode dimensions using CSS.
*/
height?: number;
/**
* Sets the padding of the Barcode. Use a number to set all paddings, or a `Padding` object for the individual sides.
*
* @default 0
*/
padding?: Padding | number;
/**
* Sets the rendering mode of the Barcode.
*
* Use `"canvas"` to render as a Canvas element or `"svg"` to render as an inline SVG.
*
* @default "svg"
*/
renderAs?: RenderMode;
/**
* Configures the Barcode text label.
*/
text?: BarcodeText;
/**
* Sets the symbology (encoding) for the Barcode.
*
* @default "Code39"
*/
type: BarcodeType;
/**
* Sets the value of the Barcode.
*/
value: number | string;
/**
* Sets the width of the Barcode in pixels.
*
* You can also set the Barcode dimensions using CSS.
*/
width?: number;
/**
* Limits how often the Barcode resizes automatically. Sets the maximum number of redraws per second when the container size changes.
* Set to `0` to disable automatic resizing.
*
* @default 10
*/
resizeRateLimit: number;
protected get options(): BarcodeOptions;
constructor(element: ElementRef, renderer: Renderer2, ngZone: NgZone);
protected createInstance(element: any, options: any): Barcode;
protected onError(error: Error): void;
static ɵfac: i0.ɵɵFactoryDeclaration<BarcodeComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<BarcodeComponent, "kendo-barcode", ["kendoBarcode"], { "background": { "alias": "background"; "required": false; }; "border": { "alias": "border"; "required": false; }; "checksum": { "alias": "checksum"; "required": false; }; "color": { "alias": "color"; "required": false; }; "height": { "alias": "height"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "renderAs": { "alias": "renderAs"; "required": false; }; "text": { "alias": "text"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; "width": { "alias": "width"; "required": false; }; "resizeRateLimit": { "alias": "resizeRateLimit"; "required": false; }; }, {}, never, never, true, never>;
}