{"id":19383697,"url":"https://github.com/jill64/svelte-code-copy","last_synced_at":"2025-02-24T17:18:00.389Z","repository":{"id":211820519,"uuid":"730032378","full_name":"jill64/svelte-code-copy","owner":"jill64","description":"❏ Just wrap it with this","archived":false,"fork":false,"pushed_at":"2023-12-22T09:30:28.000Z","size":424,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-22T10:57:43.941Z","etag":null,"topics":["button","code-block","copy","html","svelte"],"latest_commit_sha":null,"homepage":"https://svelte-code-copy.jill64.dev","language":"Svelte","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/jill64.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":"2023-12-11T03:47:53.000Z","updated_at":"2024-01-08T22:21:01.426Z","dependencies_parsed_at":"2023-12-25T21:18:08.287Z","dependency_job_id":null,"html_url":"https://github.com/jill64/svelte-code-copy","commit_stats":null,"previous_names":["jill64/svelte-code-copy"],"tags_count":49,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Fsvelte-code-copy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Fsvelte-code-copy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Fsvelte-code-copy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Fsvelte-code-copy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jill64","download_url":"https://codeload.github.com/jill64/svelte-code-copy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240521039,"owners_count":19814694,"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":["button","code-block","copy","html","svelte"],"created_at":"2024-11-10T09:27:19.696Z","updated_at":"2025-02-24T17:18:00.368Z","avatar_url":"https://github.com/jill64.png","language":"Svelte","readme":"\u003c!----- BEGIN GHOST DOCS HEADER -----\u003e\n\n# svelte-code-copy\n\n\u003c!----- BEGIN GHOST DOCS BADGES -----\u003e\n\n\u003ca href=\"https://npmjs.com/package/svelte-code-copy\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/svelte-code-copy\" alt=\"npm-version\" /\u003e\u003c/a\u003e \u003ca href=\"https://npmjs.com/package/svelte-code-copy\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/svelte-code-copy\" alt=\"npm-license\" /\u003e\u003c/a\u003e \u003ca href=\"https://npmjs.com/package/svelte-code-copy\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/svelte-code-copy\" alt=\"npm-download-month\" /\u003e\u003c/a\u003e \u003ca href=\"https://npmjs.com/package/svelte-code-copy\"\u003e\u003cimg src=\"https://img.shields.io/bundlephobia/min/svelte-code-copy\" alt=\"npm-min-size\" /\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jill64/svelte-code-copy/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/jill64/svelte-code-copy/actions/workflows/ci.yml/badge.svg\" alt=\"ci.yml\" /\u003e\u003c/a\u003e \u003ca href=\"https://svelte-code-copy.jill64.dev\"\u003e\u003cimg src=\"https://img.shields.io/website?up_message=working\u0026down_message=down\u0026url=https%3A%2F%2Fsvelte-code-copy.jill64.dev\" alt=\"website\" /\u003e\u003c/a\u003e\n\n\u003c!----- END GHOST DOCS BADGES -----\u003e\n\n❏ Just wrap it with this\n\n## [Demo](https://svelte-code-copy.jill64.dev)\n\n\u003c!----- END GHOST DOCS HEADER -----\u003e\n\n## Installation\n\n```bash\nnpm i svelte-code-copy\n```\n\n## Usage\n\n`pre` is optional.\n`\u003cCodeCopy\u003e` copies the `innerText` of `\u003ccode\u003e`\n\n```svelte\n\u003cscript\u003e\n  import { CodeCopy } from 'svelte-code-copy'\n\u003c/script\u003e\n\n\u003cCodeCopy\u003e\n  \u003cpre\u003e\n    \u003ccode\u003e\n      \u003c!-- Your code block --\u003e\n    \u003c/code\u003e\n  \u003c/pre\u003e\n\u003c/CodeCopy\u003e\n```\n\n## Props\n\n[full details](./src/lib//CodeCopy.svelte)\n\n| Prop         | Type       | Default       |\n| ------------ | ---------- | ------------- |\n| onCopy       | `function` | `undefined`   |\n| size         | `number`   | 18            |\n| background   | `string`   | `transparent` |\n| color        | `string`   | `whitesmoke`  |\n| success      | `string`   | `green`       |\n| error        | `string`   | `red`         |\n| top          | `string`   | 0.5rem        |\n| right        | `string`   | 0.5rem        |\n| border       | `string`   | `none`        |\n| padding      | `string`   | 0.25rem       |\n| borderRadius | `string`   | 0.25rem       |\n| margin       | `string`   | 0             |\n| effect       | `string`   | `pop`         |\n| duration     | `number`   | 150           |\n\n\u003c!----- BEGIN GHOST DOCS FOOTER -----\u003e\n\n## License\n\n[MIT](LICENSE)\n\n\u003c!----- END GHOST DOCS FOOTER -----\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjill64%2Fsvelte-code-copy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjill64%2Fsvelte-code-copy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjill64%2Fsvelte-code-copy/lists"}