Table
shadcn-lit-registry/tableFreeComponent
A responsive table component for displaying tabular data. Uses a simple wrapper component with CSS-based styling for native HTML table elements.
Install it
npx shadcn@latest add https://lit-registry.lloydrichards.dev/r/table.jsonSource
1import { adoptStyles, html, LitElement, unsafeCSS } from "lit";2import { customElement } from "lit/decorators.js";3import { tailwind } from "@/registry/lib/tailwindMixin";4import tableSlottedCss from "./table.css?inline";56const tableStyles = unsafeCSS(tableSlottedCss);78@customElement("ui-table")9export class Table extends LitElement {10 override connectedCallback() {11 super.connectedCallback();12 if (this.shadowRoot) {13 adoptStyles(this.shadowRoot, [tailwind, tableStyles]);14 }15 }1617 override render() {18 return html`<slot></slot>`;19 }20}2122declare global {23 interface HTMLElementTagNameMap {24 "ui-table": Table;25 }26}
Files it writes
More from shadcn-lit-registry
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | shadcn-lit-registry | Components | Free | 1 dep · 2 files | |
| Avataravatar | shadcn-lit-registry | Components | Free | no deps · 2 files | |
| Badgebadge | shadcn-lit-registry | Components | Free | no deps · 2 files | |
| Buttonbutton | shadcn-lit-registry | Components | Free | 1 dep · 2 files | |
| Cardcard | shadcn-lit-registry | Components | Free | no deps · 2 files | |
| Checkboxcheckbox | shadcn-lit-registry | Components | Free | 1 dep · 2 files | |
| Collapsiblecollapsible | shadcn-lit-registry | Components | Free | 1 dep · 2 files | |
| Commandcommand | shadcn-lit-registry | Components | Free | 1 dep · 2 files |
