{"id":41235896,"url":"https://github.com/inkeep/starter-template-widgets-embed","last_synced_at":"2026-01-23T01:03:27.173Z","repository":{"id":199351703,"uuid":"702670594","full_name":"inkeep/starter-template-widgets-embed","owner":"inkeep","description":"Testing sandbox for the widgets-embed package","archived":false,"fork":false,"pushed_at":"2024-07-10T02:58:02.000Z","size":57,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-03T08:28:11.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/inkeep.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-10-09T19:07:21.000Z","updated_at":"2025-06-08T21:35:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"8d4caefb-57b3-45ab-bed4-8d45f750c931","html_url":"https://github.com/inkeep/starter-template-widgets-embed","commit_stats":null,"previous_names":["inkeep/starter-template-widgets-embed"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/inkeep/starter-template-widgets-embed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeep%2Fstarter-template-widgets-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeep%2Fstarter-template-widgets-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeep%2Fstarter-template-widgets-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeep%2Fstarter-template-widgets-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inkeep","download_url":"https://codeload.github.com/inkeep/starter-template-widgets-embed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeep%2Fstarter-template-widgets-embed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28676488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-23T01:03:27.020Z","updated_at":"2026-01-23T01:03:27.125Z","avatar_url":"https://github.com/inkeep.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inkeep Widget JS Library\n\n## To run this sandbox\n\n### Install deps\n\n```\nnpm install\n```\n\n### Add environment variables\n\nSee .env.sample for necessary env vars\n\n### Start the dev server\n\n```\nnpm run dev\n```\n\nSee [index.html](https://github.com/inkeep/starter-template-widgets-embed/blob/main/index.html) for the example config.\n\n## To get started integrating into your own app\n\n### Add the Inkeep JS snippet\n\n```\n\n\u003c!-- widget script (required) --\u003e\n\u003cscript\n  type=\"module\"\n  src=\"https://unpkg.com/@inkeep/uikit-js@\u003cversion\u003e/dist/embed.js\"\n  defer\n\u003e\u003c/script\u003e\n```\nNOTE:\nvist https://unpkg.com/@inkeep/uikit-js@latest/dist/embed.js\nand replace `@\u003cversion\u003e` with the current latest version, example: `https://unpkg.com/@inkeep/uikit-js@0.3.4/dist/embed.js`.\n\n### Basic example\n\nWithin a `\u003cscript type=\"module\"\u003e {{ code here }} \u003c/script\u003e` tag, use the `embed()` function to insert one of our components into an HTML element on the page.\n\n```\nconst inkeepWidget = Inkeep().embed({\n  componentType: 'ChatButton', // required, options: 'ChatButton', 'EmbeddedChat', 'SearchBar', 'CustomTrigger'\n  targetElement: document.getElementById('inkeep-placeholder'), // required, HTML element to render the widget into\n  properties: {\n    baseSettings: {\n      integrationId: envConfig.INTEGRATION_ID || '', // required\n      apiKey: envConfig.API_KEY || '', // required\n      organizationId: envConfig.ORGANIZATION_ID || '', // required\n      organizationDisplayName: 'Inkeep',\n      primaryBrandColor: 'black',\n      theme: {\n        stylesheetUrls: [\n          '/widget-overrides.css', // optional custom stylings\n        ],\n      },\n      //... optional base settings\n    },\n    aiChatSettings: {\n      // optional\n    },\n    searchSettings: {\n      // optional \n    },\n    modalSettings: {\n      // optional\n    }\n  }\n});\n```\n\n### Customize the component\nIn \n\n`Inkeep().embed({...props})`\n\nAside from `componentType` and `targetElement`, the `props` are the same type as seen in any of the React components:\n- [Chat Button](https://docs.inkeep.com/react-components/chat-button)\n- [Search Bar](https://docs.inkeep.com/react-components/search-bar)\n- [Embedded Chat](https://docs.inkeep.com/react-components/embedded-chat)\n- [Custom Trigger](https://docs.inkeep.com/react-components/custom-trigger)\n\nFor example, custom 'aiChatSettings' often include:\n```\n{\n...otherProps,\naiChatSettings: {\n    chatSubjectName: '{Company or Product Name}',\n    quickQuestions: [\n      'Example question 1',\n      'Example question 2',\n    ],\n    botAvatarSrcUrl: 'https://mydomain.com/icon',\n    botAvatarDarkSrcUrl: 'https://mydomain.com/dark_icon',\n    getHelpCallToActions: [\n      {\n        url: 'http://github.com/{org}',\n        name: 'GitHub',\n        icon: { builtIn: 'FaGithub' }\n      },\n      {\n        name: 'Community',\n        url: 'https://mycommunity.com',\n        icon: { builtIn: 'IoPeopleOutline' }, // FaDiscourse, FaSlack, FaDiscord, IoHelpBuoyOutline, IoMail and others also available\n      },\n    ],\n  }\n}\n```\n\n### Share base settings across components\n\nIf you have multiple components on the same page, it might be convenient to instantiate an Inkeep object with the same base settings. \n\n```\nconst inkeepBase =  Inkeep({\n  integrationId: envConfig.INTEGRATION_ID || '', // required\n  apiKey: envConfig.API_KEY || '', // required\n  organizationId: envConfig.ORGANIZATION_ID || '', // required\n  organizationDisplayName: 'Inkeep',\n  primaryBrandColor: 'black',\n  userId: '', // if you'd like analytics by user ID, like in cases where the user is authenticated or you have your own analytics platform\n  userEmail: 'dev@inkeep.com',\n  userName: 'Inkeep',\n  optOutAllAnalytics: false,\n  optOutAnalyticalCookies: false,\n  optOutFunctionalCookies: false,\n});\n```\n\nYou can then use `inkeepBase.embed()` to instantiate different components with the same base settings.\n\n### Syncing with dark mode and changing props after the initial render\nHow color mode is changed can vary per web app platform. Regardless, you can use the `render` method to update an instance of the component with any new properties, like `colorMode`.\n\n**Example**:\n```\ncolorModeToggle.addEventListener('change', (e) =\u003e { // whatever logic you use to track the color mode\n  const newColorMode = e.target.value;\n\n  inkeepWidget.render({\n    baseSettings: {\n      colorMode: {\n        forcedColorMode: colorMode === \"dark\" ? \"dark\" : \"light\",\n      },\n  });\n\n});\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkeep%2Fstarter-template-widgets-embed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finkeep%2Fstarter-template-widgets-embed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkeep%2Fstarter-template-widgets-embed/lists"}