{"id":18685822,"url":"https://github.com/grapesjs/style-gradient","last_synced_at":"2025-06-20T15:07:16.330Z","repository":{"id":26893731,"uuid":"109765997","full_name":"GrapesJS/style-gradient","owner":"GrapesJS","description":"Add gradient input to the Style Manager in GrapesJS","archived":false,"fork":false,"pushed_at":"2023-10-07T14:39:31.000Z","size":409,"stargazers_count":19,"open_issues_count":0,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-11T18:29:48.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrapesJS.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}},"created_at":"2017-11-07T00:27:02.000Z","updated_at":"2025-04-19T22:49:30.000Z","dependencies_parsed_at":"2024-01-23T21:43:08.887Z","dependency_job_id":null,"html_url":"https://github.com/GrapesJS/style-gradient","commit_stats":null,"previous_names":["artf/grapesjs-style-gradient"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/GrapesJS/style-gradient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstyle-gradient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstyle-gradient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstyle-gradient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstyle-gradient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrapesJS","download_url":"https://codeload.github.com/GrapesJS/style-gradient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstyle-gradient/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260967377,"owners_count":23090100,"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-07T10:24:24.083Z","updated_at":"2025-06-20T15:07:11.317Z","avatar_url":"https://github.com/GrapesJS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GrapesJS Style Gradient\n\nThis plugins adds a new `gradient` property to the GrapesJS's StyleManager by using [Grapick](https://github.com/artf/grapick)\n\n\u003e Requires GrapesJS v0.20.1 or higher\n\n[Demo](https://codepen.io/artf/full/bYwdQG/)\n\n## Summary\n\n* Plugin name: `grapesjs-style-gradient`\n* Style type: `gradient` (the gradient picker input)\n* Built-in Style property: `background-image` (composite type with gradient picker and direction/type selectors)\n\n\n\n\n\n## Options\n\n| Option | Description | Default |\n|-|-|-\n| `grapickOpts` | [Grapick options](https://github.com/artf/grapick#configurations). | `{}` |\n| `colorPicker` |  Custom color picker, check [Grapick's repo](https://github.com/artf/grapick#add-custom-color-picker) to get more about it. | `undefined` |\n| `selectEdgeStops` | Select, by default, the edge color stops of the gradient picker. | `true` |\n| `styleType` | The id to assign for the gradient picker type. | `'gradient'` |\n| `builtInType` | Built-in property name to use for the composite type with the gradient picker and direction/type selectors. | `'background-image'` |\n\n\n\n\n\n## Download\n\n* CDN\n  * `https://unpkg.com/grapesjs-style-gradient`\n* NPM\n  * `npm i grapesjs-style-gradient`\n* GIT\n  * `git clone https://github.com/GrapesJS/style-gradient.git`\n\n\n\n\n\n## Usage\n\nDirectly in the browser.\n```html\n\u003clink href=\"https://unpkg.com/grapesjs/dist/css/grapes.min.css\" rel=\"stylesheet\"/\u003e\n\u003clink href=\"https://unpkg.com/grapick/dist/grapick.min.css\" rel=\"stylesheet\"\u003e\n\u003cscript src=\"https://unpkg.com/grapesjs\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/grapesjs-style-gradient\"\u003e\u003c/script\u003e\n\n\u003cdiv id=\"gjs\"\u003e\u003c/div\u003e\n\n\u003cscript type=\"text/javascript\"\u003e\n  const editor = grapesjs.init({\n      container : '#gjs',\n      // ...\n      plugins: ['grapesjs-style-gradient'],\n      pluginsOpts: {\n        'grapesjs-style-gradient': {}\n      }\n  });\n\u003c/script\u003e\n```\n\nModern javascript\n```js\nimport grapesjs from 'grapesjs';\nimport plugin from 'grapesjs-style-gradient';\n\nconst editor = grapesjs.init({\n  container : '#gjs',\n  // ...\n  plugins: [plugin],\n  pluginsOpts: {\n    [plugin]: { /* options */ }\n  }\n});\n\n// Usage via API\n\n// Add gradient picker as a single input\neditor.StyleManager.addProperty('decorations', {\n  type: 'gradient', // \u003c- new type\n  name: 'Gradient',\n  property: 'background-image',\n  defaults: 'none'\n  full: true,\n});\n\n// Add the new background-image bulti-in type\neditor.StyleManager.addProperty('decorations', {\n  extend: 'background-image', // \u003c- extend the built-in type\n  name: 'Gradient Background',\n});\n```\n\n\n\n\n\n## Development\n\nClone the repository\n\n```sh\n$ git clone https://github.com/GrapesJS/style-gradient.git\n$ cd style-gradient\n```\n\nInstall dependencies\n\n```sh\n$ npm i\n```\n\nStart the dev server\n\n```sh\n$ npm start\n```\n\n\n\n## License\n\nBSD 3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrapesjs%2Fstyle-gradient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrapesjs%2Fstyle-gradient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrapesjs%2Fstyle-gradient/lists"}