React components
Our React component Elements are pre-built packages containing complete end-to-end user flows that can be retrieved and rendered within your own application's UI.
Installation
To install a Hero Element React component, run:
yarn install @herohealthsoftware/HERO-ELEMENT
Example usage
const App = () => {
return (
<HeroHealthMessageBuilder
apiKey="YOUR_API_KEY"
tenantId="YOUR_TENANT_ID"
/>
);
};
Theme provider
You can customise the CSS of your React component within the limits of Hero Health's Theme Provider component.
Shadow DOM Encapsulation
Our components are designed with style encapsulation in mind using the Shadow DOM. This encapsulation ensures that all styles defined within the component are localized, preventing any potential conflicts with styles in the rest of your application.
Please contact Hero support for further information about how to implement your theme within a React Element.List of Hero Health React component Elements
The following packages are currently available for use:
- @herohealthsoftware/message-builder-react
- @herohealthsoftware/booking-react
- @herohealthsoftware/link-builder-react