{"id":14990133,"url":"https://github.com/zachleat/table-saw","last_synced_at":"2025-04-04T14:07:57.169Z","repository":{"id":197039612,"uuid":"697910893","full_name":"zachleat/table-saw","owner":"zachleat","description":"A small web component for responsive \u003ctable\u003e elements.","archived":false,"fork":false,"pushed_at":"2024-04-29T16:21:58.000Z","size":51,"stargazers_count":320,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T13:09:40.413Z","etag":null,"topics":["web-components"],"latest_commit_sha":null,"homepage":"https://zachleat.github.io/table-saw/demo.html","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zachleat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-28T18:17:09.000Z","updated_at":"2025-03-26T17:29:28.000Z","dependencies_parsed_at":"2023-10-01T22:49:30.958Z","dependency_job_id":"b20f3bd8-d08a-4b21-b97b-333001b1643c","html_url":"https://github.com/zachleat/table-saw","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":"0.17647058823529416","last_synced_commit":"6c12111d6d2f0cc1470c59a5284b96452d6006e2"},"previous_names":["zachleat/table-saw"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Ftable-saw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Ftable-saw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Ftable-saw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Ftable-saw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachleat","download_url":"https://codeload.github.com/zachleat/table-saw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190250,"owners_count":20898702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["web-components"],"created_at":"2024-09-24T14:19:33.524Z","updated_at":"2025-04-04T14:07:57.143Z","avatar_url":"https://github.com/zachleat.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# `table-saw`\n\nA small structural-only zero-dependency Web Component for responsive `\u003ctable\u003e` elements. Heavily inspired by [Filament Group’s Tablesaw Stack jQuery plugin](https://github.com/filamentgroup/tablesaw).\n\n## [Demo](https://zachleat.github.io/table-saw/demo.html)\n\n## Examples\n\n```html\n\u003c!-- Note: requires `type=\"module\"` --\u003e\n\u003cscript type=\"module\" src=\"table-saw.js\"\u003e\u003c/script\u003e\n\n\u003c!-- stacks below 640px viewport --\u003e\n\u003ctable-saw\u003e\n\t\u003ctable\u003e\u003c!-- some HTML omitted for brevity --\u003e\u003c/table\u003e\n\u003c/table-saw\u003e\n\n\u003c!-- stacks below 400px viewport --\u003e\n\u003ctable-saw breakpoint=\"(max-width: 24.9375em)\"\u003e\n\t\u003ctable\u003e\u003c!-- … --\u003e\u003c/table\u003e\n\u003c/table-saw\u003e\n\n\u003c!-- stack columns are 50% and 50% width --\u003e\n\u003ctable-saw ratio=\"1/1\"\u003e\n\t\u003ctable\u003e\u003c!-- … --\u003e\u003c/table\u003e\n\u003c/table-saw\u003e\n\n\u003c!-- Remove left/right padding on table cells when stacked --\u003e\n\u003ctable-saw zero-padding\u003e\n\t\u003ctable\u003e\u003c!-- … --\u003e\u003c/table\u003e\n\u003c/table-saw\u003e\n\n\u003c!-- Force left-aligned text when stacked --\u003e\n\u003ctable-saw text-align\u003e\n\t\u003ctable\u003e\u003c!-- … --\u003e\u003c/table\u003e\n\u003c/table-saw\u003e\n\n\u003c!-- Use your own text-align value when stacked --\u003e\n\u003ctable-saw text-align=\"right\"\u003e\n\t\u003ctable\u003e\u003c!-- … --\u003e\u003c/table\u003e\n\u003c/table-saw\u003e\n```\n\n* Use `breakpoint` attribute to set the breakpoint (default:`(max-width: 39.9375em)`).\n* Use `type=\"container\"` attribute to use container queries instead of viewport-based media queries (default: `type=\"media\"`).\n* Use `ratio` attribute to override the small viewport column ratio (default: `1/2`).\n* Use `zero-padding` attribute to remove small viewport padding on table cells.\n* Use `text-align` attribute to force column text alignment at small viewport.\n\n## Installation\n\nYou have a few options (choose one of these):\n\n1. Install via [npm](https://www.npmjs.com/package/@zachleat/table-saw): `npm install @zachleat/table-saw`\n1. [Download the source manually from GitHub](https://github.com/zachleat/table-saw/tags) into your project.\n1. Skip this step and use the script directly via a 3rd party CDN (not recommended for production use)\n\n### Usage\n\nMake sure you include the `\u003cscript\u003e` in your project (choose one of these):\n\n\n```html\n\u003c!-- Host yourself --\u003e\n\u003cscript type=\"module\" src=\"table-saw.js\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003c!-- 3rd party CDN, not recommended for production use --\u003e\n\u003cscript type=\"module\" src=\"https://www.unpkg.com/@zachleat/table-saw@1.0.2/table-saw.js\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003c!-- 3rd party CDN, not recommended for production use --\u003e\n\u003cscript type=\"module\" src=\"https://esm.sh/@zachleat/table-saw@1.0.2\"\u003e\u003c/script\u003e\n```\n\n## Features\n\n* Supports one or many `\u003ctable\u003e` child elements.\n* Works with viewport media queries or container queries.\n* Uses CSS grid for small viewport alignment.\n* Falls back to regular table before or without JavaScript.\n* Cuts the mustard on [`CSSStyleSheet.prototype.replaceSync`](https://caniuse.com/mdn-api_cssstylesheet_replacesync)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachleat%2Ftable-saw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachleat%2Ftable-saw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachleat%2Ftable-saw/lists"}