{"id":19892115,"url":"https://github.com/otterdev-io/sanity-plugin-power-table","last_synced_at":"2025-09-18T22:33:05.967Z","repository":{"id":129715936,"uuid":"339336718","full_name":"otterdev-io/sanity-plugin-power-table","owner":"otterdev-io","description":"Create powerful tables for sanity","archived":false,"fork":false,"pushed_at":"2021-06-09T18:33:17.000Z","size":49,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T18:23:13.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/otterdev-io.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":"2021-02-16T08:51:20.000Z","updated_at":"2021-07-06T05:31:55.000Z","dependencies_parsed_at":"2023-03-26T00:36:01.233Z","dependency_job_id":null,"html_url":"https://github.com/otterdev-io/sanity-plugin-power-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otterdev-io%2Fsanity-plugin-power-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otterdev-io%2Fsanity-plugin-power-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otterdev-io%2Fsanity-plugin-power-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otterdev-io%2Fsanity-plugin-power-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otterdev-io","download_url":"https://codeload.github.com/otterdev-io/sanity-plugin-power-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233530009,"owners_count":18689976,"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":[],"created_at":"2024-11-12T18:21:33.448Z","updated_at":"2025-09-18T22:33:00.544Z","avatar_url":"https://github.com/otterdev-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sanity-plugin-power-table\n\nCreate powerful tables in sanity:\n- Custom row and cell schema\n- Cell-level management, each cell can have its own rowSpan and colSpan\n\nbased on [sanity-plugin-byo-table](https://www.npmjs.com/package/@ssfbank/sanity-plugin-byo-table)\n\n## Installation\n\n```\nsanity install power-table\n```\n\n## Usage\n* First import the schema generating function:\n  ```js\n  import tableSchema from 'part:power-table/schema'\n  ```\n\n* Next create and export schema for your table. \n  - Row Schema is optional. It should be an object if provided.\n  - Cell schema can be a string or object.\n\n  - Minimal example:\n    ```js\n    export const myTableSchemas = tableSchema({\n      name: 'myTable',\n      title: 'My table',\n      cellSchema: {\n        type: 'string',\n      },\n    })\n    ```\n\n  - Bigger example:\n    ```js\n    export const myTableSchemas = tableSchema({\n      name: 'myTable',\n      title: 'My table',\n      rowSchema: {\n        type: 'object',\n        fields: [\n          {\n            name: 'heading',\n            title: 'Heading',\n            type: 'boolean',\n          },\n        ],\n      },\n      cellSchema: {\n        type: 'object',\n        fields: [\n          {\n            name: 'contents',\n            title: 'Contents',\n            type: 'array',\n            of: [{ type: 'block' }] \n          },\n        ],\n      },\n    })\n    ```\n\n- Use the table by the name you provided\n  ```js\n  export default {\n    name: 'mySchema',\n    title: 'My Schema',\n    type: 'document',\n    fields: [\n      {\n        name: 'headline',\n        title: 'Headline',\n        type: 'array',\n        of: [{ type: 'block' }],\n      },\n      {\n        name: 'table',\n        title: 'My Table',\n        type: 'myTable'\n      }\n    ],\n  }\n  ```\n\n- Import the table schemas in your schema.js:\n\n  ```js\n  import createSchema from 'part:@sanity/base/schema-creator'\n  import mySchema, {myTableSchemas} from './mySchema'\n\n  export default createSchema({\n    name: 'default',\n    types: [\n      mySchema,\n      ...myTableSchemas\n    ],\n  });\n  ```\n\n## License\n\nMIT © Christopher Fraser\nSee LICENSE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotterdev-io%2Fsanity-plugin-power-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotterdev-io%2Fsanity-plugin-power-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotterdev-io%2Fsanity-plugin-power-table/lists"}