High-Performance Data Grid for Angular, React & Blazor | Scheduler, Gantt & More › Forums › General Discussions › Buttons › basic usage › Reply To: basic usage
We support Shadow DOM. Smart is one of the first Web Components libraries and can be used for building Web Components.
To use Smart with LitElement, you can use this approach:
import { LitElement, html, css } from ‘lit-element’;
Smart.EnableShadowDOM = true;
export class SuperElement extends LitElement {
static get styles() {
return css`
`;
}
render() {
return html`
<link rel="stylesheet" type="text/css" href="https://htmlelements.com/demos/source/styles/smart.default.css">
<smart-button>Click me</smart-button>
`;
}
}
customElements.define(‘super-element’, SuperElement);
Regards,
Boyko