<fluid-passport> tag draws it. This page covers how to add it, where it shows, how you configure it, how you open it from your theme, and which of its features are live. For every other place the Passport runs, see The Passport.
On a Site, the storefront draws and places the Passport for you. A Site opens it with fluid.auth.openPassport(). See Passport and sign-in.
Add the Passport
Fluid adds the Passport’s script to your storefront for you, as a global embed. It loadshttps://assets.fluid.app/fluid-passport/passport.js, which defines the Passport and also shows member prices, so your theme adds only the tag. If the tag draws nothing, your storefront doesn’t load that script yet: it may still load an older script, or have a script embed Fluid couldn’t update. Ask Fluid support to move your storefront to the current script, rather than adding it yourself.
Members can sign in to the Passport only where Fluid has turned on member sign-in for your company. Without it, every visitor sees the sign-in button and can’t sign in. Ask Fluid support to turn it on.
Put the tag once in layouts/theme.liquid, just before </body>:
layouts/theme.liquid
- One tag per page. Only the first Passport on a page answers your buttons and scripts. A second one logs a console warning.
- It replaces the theme’s account menu. While a Passport is on the page, it hides every
{% member_account %}menu, so a member never sees two. A Passport withplacement="off"hides nothing. - Don’t load the script yourself. A second copy of the script doesn’t take over the first one’s Passport.
<fluid-account-menu> is the same element under its first name, so a theme written with it keeps working. Use <fluid-passport> in new themes.
Choose where it shows
Theplacement attribute sets how the Passport shows:
On a phone, the panel opens as a bottom sheet in every placement. See How it behaves on phones.
Every attribute on this page also works with a
data- prefix, such as data-placement. When a tag has both, the prefixed one wins. An unknown value falls back to the default. You can change an attribute after the page loads, and the Passport follows it.
Float it in a corner
A floating Passport takes these attributes:
For example, to put a smaller button in the bottom-left corner, clear of a chat button on the right:
bottom_center or any value it doesn’t know: that tag counts as setting no position, so the button sits in the bottom-right corner.
Put it in your header
To draw the button in your own layout, setplacement="inline" and put the tag where the button goes:
size, and sits in line with the text around it. position, x-margin and y-margin don’t move it. A guest sees a round sign-in button where the button would be.
Open it only from your own buttons
To draw no Passport button at all, setplacement="none" and give your own account button a data-fluid-passport-open attribute:
- One second after the page loads, if no visible element has
data-fluid-passport-openand nothing has opened the Passport, it falls back tofloating: its own button in the corner, which sends a guest to sign in. It stays floating for as long as it’s on the page, and marks itselfdata-fam-fallback. - Visible means drawn. An opener counts unless it’s off the page, hidden by CSS (
display: noneorvisibility: hidden), fully transparent, or has no size. The check doesn’t look at where it is, so an opener moved off screen, such as in a closed drawer, still counts, and no fallback shows. Keep at least one opener on screen. - Use the attribute, not a click handler. The check looks for
data-fluid-passport-open, so a button that callsfluid.passport.open()from its own click handler doesn’t stop the fallback. - Show the opener to guests too. A guest who clicks it is sent to sign in. If you hide it from guests, the fallback adds its own sign-in button next to yours.
Turn it off
placement="off" draws nothing and makes no request for the member’s session. Member prices keep working, because off turns off only the menu.
Configure it
Links
sign-in-url and sign-out-url take an absolute http or https URL, or a path that starts with /. checkout-url takes only an absolute https URL. Any other value falls back to the default. A sign-in or sign-out URL on your own storefront brings the member back to the page they were on. One that names its own return_to keeps it.
What members can change in the Passport
Four switches decide what the member changes inside the panel and what they change on the checkout. Write the attribute with"false" to turn a switch off, and with any other value, or none, to turn it on:
When a switch is off, the row and Manage open the member’s account on the checkout, where they make that change. For example, to let members manage cards in the Passport and keep subscriptions on the checkout:
- A checkout of your own keeps all four on. When
checkout-urlpoints anywhere buthttps://checkout.fluid.app, the Passport can’t open one record there, so it keeps every switch on, whatever the tag says. - Changes need member sites. Where your company doesn’t have member sites on, the Passport shows addresses, cards and subscriptions read-only, whatever the tag says.
- Profile isn’t a switch. Edit profile changes the member’s first name, last name and language wherever your company has member sites on. A name your company locks stays read-only.
- Adding a card stays on the checkout, whatever the tag says.
The member’s Sites
site-menu, there’s no Sites section, and the sites room opens the list instead. On a Site, the storefront sets both for you.
Light and dark
Words
Every word the Passport shows can be replaced with a<name>-label attribute. A few you’re likely to change:
{count} in row-items-label ({count} items). Words you don’t set stay in English, so set every label a page shows when you translate one.
How it stays in view
The open panel is placed by Fluid’s design system, inside the part of the screen the visitor can see, in every placement:- It opens where there’s room. It opens from its button, or beside your opener with
placement="none", and moves to the other side when there isn’t room on the first. - Its content scrolls inside it. The panel is never taller than the room it has, and a room’s title stays at the top while its content scrolls under it.
- It moves with the screen. The panel is placed again when the window resizes or the page scrolls.
How it behaves on phones
On a screen narrower than 640px, the panel is a bottom sheet in every placement. The sheet takes the full width along the bottom of the screen, over a dimmed page, and covers the Passport’s button. The member pulls it down by its handle to close it, or presses Escape on a keyboard. You don’t need a separate phone layout: an inline button in your header, or your own opener, opens the same sheet. Withprefers-reduced-motion, the panel and sheet open and close without animation.
Over your theme’s layers
The open panel, and the phone sheet with its dimmed page, are drawn in the browser’s top layer, in every placement. Nothing your theme stacks covers or clips it: not a header’soverflow: hidden, a z-index, a transform, a filter or contain. You don’t need to raise anything to keep it on top.
- The button uses
z-index. A floating button sits atz-index: 99999. Set thez-indexattribute to put something of your own, such as a chat button, above or below it. An inline button stacks with your header. - A modal
<dialog>blocks it. Your theme’s own modal dialog makes the rest of the page inert, the Passport included. Close the dialog before you open the Passport. - A click outside closes it. That click doesn’t also reach the link or button under it. Escape closes it too, and focus goes back to what opened it.
Open it from your theme
You can open the Passport from a button or link, from a script, or with an event. Each one can name the room to open on. With afloating or inline Passport, the panel always opens from the Passport’s own button. With placement="none", it opens beside the element that opened it.
Rooms
A room is one part of the member’s account, opened inside the panel:
Any other value opens the list.
From a button or link
A click on any element withdata-fluid-passport-open opens the Passport, or closes it when it’s open. The attribute’s value, if any, names the room:
href for a page without the Passport. On a page with one, the click opens the Passport instead of following the link.
- With
placement="none", a click on a different opener while the panel is open moves it beside that opener and to that opener’s room. A click on the opener it’s open for closes it. - With
floatingorinline, a click on a different opener moves a panel that an opener opened to that opener’s room, and the panel stays at the Passport’s button. A panel the member opened from the Passport’s own button closes on a click on any opener. - While the panel is open, every opener has
aria-expanded="true", and"false"once it closes. When it closes, focus goes back to the opener that opened it.
From a script
The script addsfluid.passport to the page, next to anything else already on window.fluid:
openandtoggletakeroom, a room from the table above, andanchor, the element focus returns to on close. Withplacement="none", the panel also opens besideanchor, unless it’s hidden.- Without an
anchor, aplacement="none"panel opens beside the first visibledata-fluid-passport-openelement, or from the cornerpositionnames when there’s none. togglecloses an open panel, whatever room or anchor it names.- For a guest,
openandtogglesend the visitor to sign in instead. Signing in brings them back to the page they were on. - A call made before the Passport knows who’s signed in is carried out once it does. A
close, or a secondtoggle, made before then cancels it. isOpenis read-only, and so isfluid.passport. Don’t assign it.
Before the script loads
The Passport’s script loads as a module script, after your theme’s own inline scripts have run. To callfluid.passport from a script that may run first, put this stub before it:
fluid.passport as usual. When the script loads, it replaces the stub and replays the queued calls in order, once a Passport is on the page.
With events
You can also dispatch an event onwindow, with the same room and anchor in detail:
fluid-passport:opened and fluid-passport:closed, which bubble to window, with the room in detail.room:
fluid-account-menu:member-changed, which bubbles to window. Drop anything your theme keeps per member on that event.
The element itself also has open() and toggle(), which take the same options, and an isOpen property. They work on any <fluid-passport>, not only the first one on the page. To close it, use fluid.passport.close() or the close event, which put focus back on what opened it.
Style it and read its state
The Passport is drawn in a shadow root with Fluid’s design system, in its own Inter typeface. Your theme’s CSS, its theme settings and CSS custom properties don’t reach inside it. You change it only through the attributes on this page: placement, position, size, margins,z-index, color-scheme, the links and the words.
Your theme can still read the tag and hide it. The tag carries these attributes, which you can use in CSS selectors or scripts:
For example, to show a header link only to guests, and hide the Passport on a landing page:
<fluid-passport> hides the whole Passport. The tag draws no box of its own around the button.
If the Passport doesn’t load
The panel’s code loads when the Passport is first drawn, not with the page’s script. If it doesn’t load, for example because the visitor is offline or a blocker refuses the request, the Passport steps aside:- It draws nothing, sets
data-fam-state="failure"and logs one console error. - Your openers work as plain links again: an opener with an
hreffollows it, including one the member clicked while the code was still loading. - A
{% member_account %}menu the Passport hid shows again. - It doesn’t try again. A reload brings the Passport back.
href to a real page, such as your storefront’s account page, so members still have a way in.
What’s live
As of December 2026, every storefront that draws a Passport draws this one: there’s no older Passport to switch to. Stage and production run the same release, so nothing below is stage-only. Everything below needs member sign-in turned on for your company.
A feature that needs member sites or Mist simply doesn’t show where your company doesn’t have it, with no error.
What not to do
- Don’t load the script a second time, or pin another version of it. See Add the Passport.
- Don’t add a second
<fluid-passport>. Only the first answers your openers, scripts and events. - Don’t set
position="bottom_center". The Passport doesn’t read it, and the button goes to the bottom-right corner. - Don’t open a
placement="none"Passport from a click handler, and don’t hide its opener from guests. See Open it only from your own buttons. - Don’t style the Passport’s insides. Your CSS doesn’t reach them. Use the attributes in Configure it.
- Don’t assign
fluid.passport. Use the stub, which keeps an API that’s already there.
For agents
To put the Passport’s button in a theme’s header, list the member’s Sites, and add a button elsewhere that opens it on orders:- The page has exactly one
<fluid-passport>and loads the Passport’s script once. - The theme doesn’t also show a
{% member_account %}menu where the Passport should be. - Signed in, a click opens the panel, and Escape closes it and puts focus back.
- Signed out, the visitor sees the round sign-in button, and an opener sends them to sign in.
- At a phone width, under 640px, the panel opens as a bottom sheet that closes when pulled down.
- In a short window, all of the panel stays on screen and its content scrolls.
- With
placement="none", the theme’s opener is visible to guests and members, and no corner button shows up a second after load. - With the Passport’s script blocked,
<fluid-passport>hasdata-fam-state="failure"and the opener link goes to itshref.
fluid.auth.openPassport() from a click instead, and check it on the published Site. See Passport and sign-in.