{"id":15069983,"url":"https://github.com/snelsi/next-hubspot","last_synced_at":"2025-05-08T21:25:28.701Z","repository":{"id":37042743,"uuid":"485318634","full_name":"snelsi/next-hubspot","owner":"snelsi","description":"⭐Embed Hubspot forms in your Next.js application","archived":false,"fork":false,"pushed_at":"2024-02-20T12:11:07.000Z","size":302,"stargazers_count":64,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-20T08:56:50.512Z","etag":null,"topics":["forms","hooks","hubspot","nextjs","react"],"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/snelsi.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}},"created_at":"2022-04-25T10:08:47.000Z","updated_at":"2024-10-17T15:55:13.000Z","dependencies_parsed_at":"2022-06-25T06:28:58.134Z","dependency_job_id":"31f8ab2b-332b-4426-a5a1-b82c6f043cb3","html_url":"https://github.com/snelsi/next-hubspot","commit_stats":{"total_commits":76,"total_committers":4,"mean_commits":19.0,"dds":"0.11842105263157898","last_synced_commit":"fc9be2fc4fcc1fce3e465d05b6cbc7ff2aa83ae9"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snelsi%2Fnext-hubspot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snelsi%2Fnext-hubspot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snelsi%2Fnext-hubspot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snelsi%2Fnext-hubspot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snelsi","download_url":"https://codeload.github.com/snelsi/next-hubspot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238044095,"owners_count":19407128,"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":["forms","hooks","hubspot","nextjs","react"],"created_at":"2024-09-25T01:46:10.943Z","updated_at":"2025-05-08T21:25:28.694Z","avatar_url":"https://github.com/snelsi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⭐ Hubspot Forms for Next.js\n\nEmbed HubSpot forms into your Next.js application using hooks.\n\n[![npm (scoped)](https://img.shields.io/npm/v/next-hubspot?style=flat-square)](https://www.npmjs.com/package/next-hubspot)\n[![Bundle Size](https://img.shields.io/bundlephobia/min/next-hubspot?style=flat-square)](https://bundlephobia.com/result?p=next-hubspot)\n![type definition](https://img.shields.io/npm/types/next-hubspot)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/snelsi/next-hubspot/blob/master/LICENSE)\n\n🌳 Tiny and Tree-Shakable\n\n🦄 Written in TypeScript\n\n👾 Works with multiple forms\n\n😎 Uses `next/script` component\n\n## Install\n\n```ssh\nnpm install next-hubspot\n```\n\nor\n\n```ssh\npnpm add next-hubspot\n```\n\nor\n\n```ssh\nyarn add next-hubspot\n```\n\n## Pure ESM package\n\nThis package is now [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). It cannot be `require()`'d from CommonJS.\n\n## Getting Started\n\nWrap your application with `HubspotProvider`. This will add [Hubspot script](https://js.hsforms.net/forms/v2.js) to your document.\nAll props are passed directly to the Script tag, so you can use all props from the [next/script documentation](https://nextjs.org/docs/api-reference/next/script).\n\n```TSX\nimport { HubspotProvider } from 'next-hubspot';\n\nconst MyApp = ({ Component, pageProps }) =\u003e (\n    \u003cHubspotProvider\u003e\n      \u003cComponent {...pageProps} /\u003e\n    \u003c/HubspotProvider\u003e\n)\n\n```\n\n## Usage\n\n```TSX\nimport { useHubspotForm } from 'next-hubspot';\n\nconst HubspotForm = () =\u003e {\n    const { isFormCreated, isError, error } = useHubspotForm({\n        portalId: 'XXXXXXX',\n        formId: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',\n        target: '#hubspot-form-wrapper'\n    });\n\n    return (\n        \u003cdiv id=\"hubspot-form-wrapper\" /\u003e\n    )\n}\n```\n\nAll props are based on the [HubSpot docs](https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options).\n\n## Related Official Hubspot Documentation:\n\n- [hubspot-form-if-im-using-an-external-site](https://knowledge.hubspot.com/forms/how-can-i-share-a-hubspot-form-if-im-using-an-external-site)\n- [forms/advanced_form_options](https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options)\n- [building-blocks/forms](https://developers.hubspot.com/docs/cms/building-blocks/forms)\n- [buildung-blocks/forms#using-embed-code](https://developers.hubspot.com/docs/cms/building-blocks/forms#using-the-form-hubl-tag:~:text=the%20parameters%20available.-,Using%20the%20form%20embed%20code,-When%20adding%20forms)\n\n## TypeScript\n\nThe module is written in TypeScript and type definitions are included.\n\n## Contributing\n\nContributions, issues and feature requests are welcome!\n\n## Show your support\n\nGive a ⭐️ if you like this project!\n\n## LICENSE\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnelsi%2Fnext-hubspot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnelsi%2Fnext-hubspot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnelsi%2Fnext-hubspot/lists"}