Skip to content

Instantly share code, notes, and snippets.

@isocroft
Created April 26, 2026 23:34
Show Gist options
  • Select an option

  • Save isocroft/f1220ca2b87221a14a767c5984ba0c16 to your computer and use it in GitHub Desktop.

Select an option

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)
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