Start from the example
We built a ready-made Framer project with a menu that already works this way. Open it, copy the menu into your own site, and change the labels and pages. Open the navigation example (opens in a new tab)The example is a Framer link. It opens Framer, asks you to sign in to your Framer account, and then lets you copy the project into your own account. It is not a live website to browse.
Build it yourself
1
Add the code overrides file
In the plugin, open Components and insert Auth Overrides, review the code and click Create file. A file named
AuthPluginOverrides appears in your project’s code. If you used the Setup Wizard, it may already be there.2
Add two links to your menu
In your menu, add one link labelled Login that goes to your sign-in page, and one link labelled My Dashboard that goes to
/dashboard (or your own protected page). Place them in the same spot.3
Hide Login from signed-in visitors
Select the Login link. In the right panel open Code Overrides, choose
AuthPluginOverrides, then ShowWhenGuest.4
Hide My Dashboard from signed-out visitors
Select the My Dashboard link. In Code Overrides choose
AuthPluginOverrides, then ShowWhenAuthenticated.5
Protect the dashboard page
Add
/dashboard to Protected Pages in the plugin, so only signed-in visitors can open it. See Dashboard.6
Publish and test
Publish your site. Visit it signed out and you see Login. Sign in and you see My Dashboard.
Good to know
- The signed-in link can look missing while you design. There is no signed-in visitor on the Framer canvas, so an element with ShowWhenAuthenticated is usually hidden there. To edit it, turn the override off for a moment and turn it back on before you publish.
- A signed-in visitor can briefly see the signed-out menu. On a page’s first load the menu may show Login for a split second before it switches to My Dashboard.
- Use the same override for every copy of the menu. If you have a header on desktop and a separate menu on mobile, apply the overrides to the links in both.