Add a changelog widget to your React app

Lytmark is an in-app changelog, public roadmap and feature-voting widget for SaaS products and web apps. Add a “What’s new” panel, an ideas box and roadmap voting to your product with one line of code, for a flat monthly price with no per-user limits.

This guide adds it to a React app (Vite, Create React App or your own setup): one line in index.html, or a small component that loads it once. You’ll get a “What’s new” panel with an unread badge and one-tap reactions on every update. On Pro, the same widget also gets Roadmap and Ideas tabs.

Before you start

  • A free Lytmark accountSign up at app.lytmark.com. No card needed.
  • Your project IDIt’s on the Install page of your dashboard, already filled into the snippet.
  • About 5 minutesOne line of code, pasted once for the whole site.

Install steps

Pathindex.html (or your root component)before </body>

  1. Copy your snippet

    In your Lytmark dashboard, open Install and copy the snippet. Your project ID is already filled in there; in the examples on this page it’s YOUR_PROJECT_ID.

    Your snippet
    <script src="https://api.lytmark.com/widget.js" data-id="YOUR_PROJECT_ID"></script>
  2. Paste into index.html

    Easiest: paste the snippet before </body> in index.html (Vite, Create React App). It loads once and survives route changes.

    index.html
    <!-- index.html -->
    <body>
      <div id="root"></div>
      <script type="module" src="/src/main.jsx"></script>
      <script src="https://api.lytmark.com/widget.js" data-id="YOUR_PROJECT_ID"></script>
    </body>
  3. Or load it from code

    Or load it from code: add this component once, at the root of your app (next to your router), not on every page.

    LytmarkWidget.jsx
    // LytmarkWidget.jsx
    import { useEffect } from 'react';
    
    export function LytmarkWidget() {
      useEffect(() => {
        if (document.querySelector('script[src="https://api.lytmark.com/widget.js"]')) return;
        const s = document.createElement('script');
        s.src = 'https://api.lytmark.com/widget.js';
        s.async = true;
        s.dataset.id = 'YOUR_PROJECT_ID';
        document.body.appendChild(s);
      }, []);
      return null;
    }
    
    // App.jsx:  <LytmarkWidget />
  4. Deploy, then open it

    Deploy, then open your app once. The Install page in your dashboard turns green when the widget loads for the first time.

Use your own button

Prefer a button in your own navigation over the round one? Any element with data-lytmark-trigger opens the widget:

React
// Any element with data-lytmark-trigger opens the widget
export function WhatsNewButton() {
  return <button data-lytmark-trigger>What's new</button>;
}

On pages that have a trigger the round button hides by itself. To hide it everywhere, add data-position="none" to the snippet (in the component: s.dataset.position = 'none'). While there are unread posts, the widget sets data-lytmark-unread on your button, so you can style your own dot.

Check that it works

Open the Install page in your Lytmark dashboard. The first time the widget loads on your site, its status turns green: Live on followed by your site’s host. On your site, the round button appears in the corner you picked in the dashboard (bottom right by default); click it to open the “What’s new” panel.

Using data-consent="pending" or data-track="false"? Then the check waits too: the widget reports your host only once tracking is allowed.

Not showing up?

You haven’t deployed yet

The widget loads wherever the snippet runs. Deploy, then open the deployed site. A local dev server works too: the Install page lists it as a local host.

Your browser shows an old version

Hard-refresh (Ctrl/⌘ + Shift + R) or open the site in a private window. If you use a CDN or cache plugin, purge it.

The code is only on one page

Put it in the shared layout, footer or site-wide settings so every page loads it. The status turns green as soon as any page with the code is opened.

An ad blocker or privacy extension hides it

Try a private window with extensions off. Most visitors don’t block it; this mostly affects your own browser.

Your site has a Content Security Policy

Allow https://api.lytmark.com in script-src and connect-src. Post images come from api.lytmark.com and media.lytmark.com.

CSP
script-src 'self' https://api.lytmark.com;
connect-src 'self' https://api.lytmark.com;
img-src 'self' https://api.lytmark.com https://media.lytmark.com;

Videos in posts also need frame-src; see the full list.

React changelog widget FAQ

Should I use index.html or the component?

index.html is the easiest: the widget loads once and survives route changes. Use the component when you’d rather keep it in code; add it once at the root of your app, next to your router, not on every page.

Will it load twice in StrictMode or on re-renders?

No. The component checks whether the script is already on the page before adding it, and the widget itself ignores a second copy.

Does it work with React Router?

Yes. Loaded once at the root, the widget stays on screen through client-side navigation.

Will it slow down my React app?

The snippet adds a small loader, which loads the widget asynchronously. The widget is under 30 KB gzipped and draws inside Shadow DOM, so your styles and its styles never touch.

Can I show it only to logged-in users?

There’s no setting for it in Lytmark: the widget shows on every page where the snippet runs. Load it only in the part of your app behind sign-in, for example by rendering the component only inside your signed-in layout. To tell the widget who is signed in, so votes and ideas need no typed email, call Lytmark.identify(); see identify signed-in users.

Add Lytmark to React today.

Free plan, no card. Live in about five minutes.