Hypertune Toolbar

Overview

The Hypertune Toolbar lets you view and override feature flags directly in your frontend.

Setup

1. Ensure Tailwind CSS is set up

Make sure your project has Tailwind CSS set up and that you are importing its base styles.

2. Create a flag to control visibility

In the Hypertune UI, create a flag called showHypertuneToolbar. This flag will control whether the Hypertune Toolbar is visible.

3. Set the environment variable

Set the HYPERTUNE_INCLUDE_TOOLBAR environment variable to true:

4. Regenerate the client

Regenerate the client:

5. Add the <HypertuneToolbar> component

Add the generated <HypertuneToolbar> component to your app, passing it the path to the flag you created earlier via the showFlagPath prop:

6. Handle overrides on the server

Overrides are stored in a cookie called hypertuneOverride. If you're using Next.js or hydrating the SDK from the server, update your getHypertune function to read this cookie and pass it to hypertuneSource.setOverride:

Last updated