{"id":26009925,"url":"https://github.com/innovixx/payload-icon-picker-field","last_synced_at":"2025-03-05T22:26:28.789Z","repository":{"id":208095500,"uuid":"720197221","full_name":"innovixx/payload-icon-picker-field","owner":"innovixx","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-22T19:35:50.000Z","size":598,"stargazers_count":29,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-20T18:01:49.548Z","etag":null,"topics":["payload-field","payload-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/innovixx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-17T19:49:42.000Z","updated_at":"2025-02-18T09:12:13.000Z","dependencies_parsed_at":"2024-09-18T20:09:54.441Z","dependency_job_id":null,"html_url":"https://github.com/innovixx/payload-icon-picker-field","commit_stats":null,"previous_names":["innovixx-development/payload-icon-picker-field"],"tags_count":8,"template":false,"template_full_name":"innovixx/payload-plugin-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovixx%2Fpayload-icon-picker-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovixx%2Fpayload-icon-picker-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovixx%2Fpayload-icon-picker-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovixx%2Fpayload-icon-picker-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/innovixx","download_url":"https://codeload.github.com/innovixx/payload-icon-picker-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242112730,"owners_count":20073655,"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":["payload-field","payload-plugin"],"created_at":"2025-03-05T22:26:27.970Z","updated_at":"2025-03-05T22:26:28.781Z","avatar_url":"https://github.com/innovixx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payload Icon Picker Field\n\n[![NPM](https://img.shields.io/npm/v/@innovixx/payload-icon-picker-field)](https://www.npmjs.com/package/@innovixx/payload-icon-picker-field)\n\nA field for [Payload](https://github.com/payloadcms/payload) which implements a robust icon picker which can be used with react-icons or custom svg icons.\n\n![payload-icon-picker-field-screenshot.png](https://github.com/Innovixx-Development/payload-icon-picker-field/blob/master/screenshots/payload-icon-picker-field-screenshot.png?raw=true)\n\nCore features:\n\n  - {{core features list}}\n\n## Installation\n\n```bash\n  yarn add @innovixx/payload-icon-picker-field\n  # OR\n  npm i @innovixx/payload-icon-picker-field\n```\n\n## Basic Usage\n\n```js\nimport * as fa6Icons from 'react-icons/fa6'\nimport iconPickerField from '@innovixx/payload-icon-picker-field'\nimport type { CollectionConfig } from 'payload/types'\n\nconst Pages: CollectionConfig = {\n  slug: 'pages',\n  admin: {\n    useAsTitle: 'title',\n  },\n  fields: [\n    {\n      name: 'title',\n      type: 'text',\n      required: true,\n    },\n    iconPickerField({\n      name: 'customIcons',\n      label: 'Custom Icons',\n      icons: {\n        house: '\u003csvg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewBox=\"0 0 576 512\"...',\n        user: '\u003csvg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewBox=\"0 0 576 512\"...',\n        check: '\u003csvg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewBox=\"0 0 576 512\"...',\n      },\n    }),\n    iconPickerField({\n      name: 'reactIconsIcon',\n      label: 'React Icons',\n      reactIconPack: fa6Icons,\n    }),\n  ],\n}\n\nexport default Pages\n\n```\n\n## Development\n\nTo actively develop or debug this plugin you can either work directly within the demo directory of this repo, or link your own project.\n\n1. #### Internal Demo\n\n   This repo includes a fully working, self-seeding instance of Payload that installs the plugin directly from the source code. This is the easiest way to get started. To spin up this demo, follow these steps:\n\n   1. First clone the repo\n   1. Then, `cd YOUR_PLUGIN_REPO \u0026\u0026 yarn \u0026\u0026 cd demo \u0026\u0026 yarn \u0026\u0026 yarn cleanDev`\n   1. Now open `http://localhost:3000/admin` in your browser\n   1. Enter username `admin@innovixx.co.uk` and password `Pa$$w0rd!`\n\n   That's it! Changes made in `./src` will be reflected in your demo. Keep in mind that the demo database is automatically seeded on every startup, any changes you make to the data get destroyed each time you reboot the app.\n\n1. #### Linked Project\n\n   You can alternatively link your own project to the source code:\n\n   1. First clone the repo\n   1. Then, `cd YOUR_PLUGIN_REPO \u0026\u0026 yarn \u0026\u0026 cd demo \u0026\u0026 cp env.example .env \u0026\u0026 yarn \u0026\u0026 yarn dev`\n   1. Now `cd` back into your own project and run, `yarn link @innovixx/payload-icon-picker-field`\n   1. If this plugin using React in any way, continue to the next step. Otherwise skip to step 7.\n   1. From your own project, `cd node_modules/react \u0026\u0026 yarn link \u0026\u0026 cd ../react-dom \u0026\u0026 yarn link \u0026\u0026 cd ../../`\n   1. Then, `cd YOUR_PLUGIN_REPO \u0026\u0026 yarn link react react-dom`\n\n   All set! You can now boot up your own project as normal, and your local copy of the plugin source code will be used. Keep in mind that changes to the source code require a rebuild, `yarn build`.\n\n   You might also need to alias these modules in your Webpack config. To do this, open your project's Payload config and add the following:\n\n   ```js\n   import { buildConfig } from \"payload/config\";\n\n   export default buildConfig({\n     admin: {\n       webpack: (config) =\u003e ({\n         ...config,\n         resolve: {\n           ...config.resolve,\n           alias: {\n             ...config.resolve.alias,\n             react: path.join(__dirname, \"../node_modules/react\"),\n             \"react-dom\": path.join(__dirname, \"../node_modules/react-dom\"),\n             payload: path.join(__dirname, \"../node_modules/payload\"),\n             \"@innovixx/payload-icon-picker-field\": path.join(\n               __dirname,\n               \"../../payload/payload-plugin-boilerplate/src\"\n             ),\n           },\n         },\n       }),\n     },\n   });\n   ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovixx%2Fpayload-icon-picker-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnovixx%2Fpayload-icon-picker-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovixx%2Fpayload-icon-picker-field/lists"}