Created
April 26, 2026 23:34
-
-
Save isocroft/f1220ca2b87221a14a767c5984ba0c16 to your computer and use it in GitHub Desktop.
This is a sample component that makes use of Lit, QuietUI and HTMX to render HTML in a browser (web site/app)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { LitElement, html, css } from 'lit'; | |
| import { customElement } from 'lit/decorators.js'; | |
| // Import Quiet UI CSS token architecture | |
| import quietStyles from '@quietui/quietui/restyle.css?inline'; | |
| @customElement('card-component') | |
| export class CardComponent extends LitElement { | |
| static styles = [ | |
| // Apply Quiet UI CSS | |
| css: `${unsafeCSS(quietStyles)}`, | |
| // Component-specific styles | |
| css:` | |
| :host { display: block; padding: 1rem; } | |
| ` | |
| ]; | |
| /* | |
| :host { | |
| --my-color: var(--qui-primary-color); | |
| --my-spacing: var(--qui-spacing-md); | |
| } | |
| */ | |
| render () { | |
| return html` | |
| <div class="card-container"> | |
| <slot></slot> | |
| </div> | |
| `; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment