igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
59 lines (58 loc) • 2.1 kB
TypeScript
import type { IconButtonVariant } from '../types.js';
import { IgcButtonBaseComponent } from './button-base.js';
/**
* A button that displays a single icon, designed for compact, icon-only
* interactions such as toolbar actions, floating action buttons, or inline
* controls.
*
* The icon is sourced from the icon registry via the `name` and `collection`
* attributes. Like the normal button, it can render as an anchor element when
* `href` is set and is fully form-associated.
*
* @element igc-icon-button
*
* @slot - Optional label rendered alongside the icon, useful for
* accessibility or augmented layouts.
*
* @csspart base - The wrapping element of the icon button.
* @csspart icon - The icon element of the icon button.
*/
export default class IgcIconButtonComponent extends IgcButtonBaseComponent {
static readonly tagName = "igc-icon-button";
protected static styles: import("lit").CSSResult[];
static register(): void;
/**
* The name of the icon to display.
* @attr name
*/
name?: string;
/**
* The collection the icon belongs to.
* @attr collection
*/
collection?: string;
/**
* Determines whether the icon should be mirrored in right-to-left contexts.
* @attr mirrored
* @default false
*/
mirrored: boolean;
/**
* The variant of the button which determines its visual appearance.
* - `contained` – filled background; highest visual emphasis (default).
* - `outlined` – transparent background with a visible border.
* - `flat` – no background or border; lowest visual emphasis.
* @attr variant
* @default 'contained'
*/
variant: IconButtonVariant;
constructor();
protected _renderContent(): import("lit-html").TemplateResult<1>;
protected registerIcon(name: string, url: string, collection?: string): Promise<void>;
protected registerIconFromText(name: string, iconText: string, collection?: string): void;
}
declare global {
interface HTMLElementTagNameMap {
'igc-icon-button': IgcIconButtonComponent;
}
}