Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
react-driftjs
Advanced tools
React component implementation of Drift Chatbot Widget.
npm install react-driftjs
import Drift from "react-driftjs";
<Drift appId="xxxxx" />; //get the appId from drift.com
To identify the user with an ID that is unique in your application, include a userId
property with that value. This will trigger the chatbot to use the identify
method. If userId
is omitted, the component will have the chatbot use the setUserAttributes
method.
<Drift
appId="xxxxx"
userId="1234"
attributes={{ email: "user@example.com", company: "Acme Inc" }}
/>
The chatbot widget emits several events. A listing of the events can be found here: https://devdocs.drift.com/docs/drift-events#section-first-interaction
To handle the events, assign an array of objects to the eventHandlers property. The event
property will match the name of the event emitted by drift. The function
property is the function definition of the handler.
<Drift
appId="xxxxx"
eventHandlers={[
{ event: "conversation:firstInteraction", function: handleInteraction },
]}
/>;
const handleInteraction = function () {
console.log("User has just interacted with the chatbot");
};
To add custom styling to the root <iframe>
element (e.g. to change the position of the chatbot widget) you can assign a style object to the style
property. This object will be parsed as a css string and added to a style tag in the head of the document.
<Drift
appId="xxxxx"
style={{
bottom: "100px",
}}
/>
Includes TypeScript definitions.
More information can be found here: https://www.drift.com/
MIT
FAQs
React component implementation of Drift Chatbot Widget
The npm package react-driftjs receives a total of 6,553 weekly downloads. As such, react-driftjs popularity was classified as popular.
We found that react-driftjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.