@shoelace-style/shoelace
Version:
A forward-thinking library of web components.
38 lines (37 loc) • 1.36 kB
TypeScript
import ShoelaceElement from '../../internal/shoelace-element.js';
import SlIconButton from '../icon-button/icon-button.component.js';
import type { CSSResultGroup } from 'lit';
/**
* @summary Tags are used as labels to organize things or to indicate a selection.
* @documentation https://shoelace.style/components/tag
* @status stable
* @since 2.0
*
* @dependency sl-icon-button
*
* @slot - The tag's content.
*
* @event sl-remove - Emitted when the remove button is activated.
*
* @csspart base - The component's base wrapper.
* @csspart content - The tag's content.
* @csspart remove-button - The tag's remove button, an `<sl-icon-button>`.
* @csspart remove-button__base - The remove button's exported `base` part.
*/
export default class SlTag extends ShoelaceElement {
static styles: CSSResultGroup;
static dependencies: {
'sl-icon-button': typeof SlIconButton;
};
private readonly localize;
/** The tag's theme variant. */
variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger' | 'text';
/** The tag's size. */
size: 'small' | 'medium' | 'large';
/** Draws a pill-style tag with rounded edges. */
pill: boolean;
/** Makes the tag removable and shows a remove button. */
removable: boolean;
private handleRemoveClick;
render(): import("lit-html").TemplateResult<1>;
}