{"id":18770653,"url":"https://github.com/robertov8/google-classroom-share","last_synced_at":"2025-04-13T07:32:04.700Z","repository":{"id":57279957,"uuid":"292711693","full_name":"robertov8/google-classroom-share","owner":"robertov8","description":"Classroom share button to your website, you allow your users to share your content to their classes and drive traffic to your site.","archived":false,"fork":false,"pushed_at":"2021-05-12T19:40:07.000Z","size":8143,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T23:51:06.688Z","etag":null,"topics":["google-classroom","npm","package","react"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/google-classroom-share","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertov8.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}},"created_at":"2020-09-04T00:44:18.000Z","updated_at":"2025-02-16T23:43:49.000Z","dependencies_parsed_at":"2022-09-19T15:22:22.856Z","dependency_job_id":null,"html_url":"https://github.com/robertov8/google-classroom-share","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertov8%2Fgoogle-classroom-share","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertov8%2Fgoogle-classroom-share/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertov8%2Fgoogle-classroom-share/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertov8%2Fgoogle-classroom-share/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertov8","download_url":"https://codeload.github.com/robertov8/google-classroom-share/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281378,"owners_count":21077423,"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":["google-classroom","npm","package","react"],"created_at":"2024-11-07T19:20:38.803Z","updated_at":"2025-04-13T07:32:04.036Z","avatar_url":"https://github.com/robertov8.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-classroom-share\n\n\u003ca\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/google-classroom-share?\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003ca\u003e\u003cimg alt=\"node-current\" src=\"https://img.shields.io/node/v/google-classroom-share?style=flat-square\"\u003e\u003c/a\u003e\n\u003ca\u003e\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/robertov8/google-classroom-share?style=flat-square\"\u003e\u003c/a\u003e\n\u003ca\u003e\u003cimg alt=\"npm bundle size\" src=\"https://img.shields.io/bundlephobia/min/google-classroom?style=flat-square\"\u003e\u003c/a\u003e\n\u003ca\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dm/google-classroom\"\u003e\u003c/a\u003e\n\u003ca\u003e\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/robertov8/google-classroom\"\u003e\u003c/a\u003e\n\u003ca\u003e\u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/l/google-classroom\"\u003e\u003c/a\u003e\n\u003ca\u003e\u003cimg alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/robertov8/google-classroom?style=flat-square\"\u003e\u003c/a\u003e\n\nYou can add and customize the Classroom share button to meet the needs of your \nwebsite, such as modifying the button size and load technique. By adding the Classroom\nshare button to your website, you allow your users to share your content to their \nclasses and drive traffic to your site.\n\n# Install \n```\nyarn add google-classroom-share react-load-script\n```\n\n# Demo\n![](./assets/sharebutton.gif)\nhttps://robertov8.github.io/google-classroom-share\n\nhttps://developers.google.com/classroom/guides/sharebutton\n\n\n# Usage\n```javascript\nimport React from 'react';\n\nimport GoogleShareToClassRoom from '../index';\n\nfunction App() {\n  return (\n    \u003cGoogleShareToClassRoom\n      body=\"Example Body\"\n      itemType=\"assignment\"\n      url=\"https://developers.google.com/classroom\"\n      size={50}\n      title=\"Example Title\"\n      theme=\"light\"\n      onShare={(type) =\u003e console.log(`GoogleShareToClassRoom:${type}`)}\n      onShareComplete={() =\u003e console.log('GoogleShareToClassRoom:onShareComplete')}\n      onShareStart={() =\u003e console.log('GoogleShareToClassRoom:onShareStart')}\n    /\u003e\n  );\n}\n\nexport default App;\n```\n\n## Props\n| Prop            |  Type    | Description\n| --------------- | -------- | -----------\n| body            | String   | Sets the item body text to share to Classroom.\n| itemType        | String   | \"announcement, assignment, material, question\" This will automatically show the creation dialog after the user first selects a course (or immediately if courseid is also specified).\n| url             | String   | Sets the URL to share to Classroom. If you set this attribute by using gapi.sharetoclassroom.render, you should not escape the URL.\n| size            | Number   | Sets the size in pixels of the share button. If the size is omitted, the button uses 32.\n| title           | String   | Sets the item title to share to Classroom.\n| theme           | String   | Sets the button icon for the selected theme.\n| onShare         | String   | If specified, sets the name of a function is called when the share dialog opens and user finishes sharing your link.\n| onShareComplete | Function | If specified, sets the name of a function is called when the user finishes sharing your link.\n| onShareStart    | Function | If specified, sets the name of a function is called when the share dialog opens. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertov8%2Fgoogle-classroom-share","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertov8%2Fgoogle-classroom-share","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertov8%2Fgoogle-classroom-share/lists"}