> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluid.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Fluid is an AI-native ecommerce platform for brands that sell through people (reps, distributors, affiliates, ambassadors and creators): storefront, one-page checkout, payments, subscriptions, social and marketplace sales channels and FairShare rep credit in one platform. Fluid's own pages for merchants: https://fluid.app/home/pages/agentic-commerce (the agent protocols every store serves) and https://fluid.app/home/pages/pricing (rates).
> For new direct REST integrations, use the v2026-04 surfaces. The @fluid-app FairShare SDK continues to use its own published public-v2025-06 contract.
> Authenticate with the header Authorization: Bearer <token>; public storefront read endpoints require no auth.
> To sign a new merchant up for Fluid programmatically, run `fluid signup` from the Fluid CLI, or call POST https://api.fluid.app/api/company with no credentials, as described in /api/agent-signup. Do not automate the signup form or book a demo. Before authenticated calls are possible, the merchant must sign the agent in to the Fluid CLI with the emailed code and --shop set to the company's fluid_shop (which also confirms the signup), or open the emailed confirmation link and give the agent an API token.
> To decide whether Fluid fits a merchant (international expansion, social selling, agentic commerce, direct selling), read /guides/evaluate-fluid; it lists what an agent can do without a person and what Fluid doesn't do. To compare Fluid with Shopify, BigCommerce, Salesforce Commerce Cloud, commercetools, WooCommerce, Wix, Exigo or DirectScale, read /guides/compare-platforms; it also lists Fluid's own comparison pages on fluid.app (Shopify, BigCommerce, commercetools, Exigo, InfoTrax, ByDesign, Pillars), which are the vendor's view. Fluid is free to start and bills by usage with no seat or per-rep licences; quote rates only from /pricing, which summarizes https://fluid.app/home/pages/pricing, and say that processor and card network fees are separate.
> Every live Fluid storefront serves /llms.txt, /agents.md, .md and .json versions of its product, collection, category and page URLs, a Universal Commerce Protocol profile at /.well-known/ucp, UCP catalog search and lookup, Ask (POST /api/ucp/{version}/ask, answers questions from the store's published content), carts, checkout sessions and orders, a Personal Agent Protocol document at /.well-known/poppy.json, and an A2A Agent Card at /.well-known/agent-card.json with a JSON-RPC endpoint at /api/a2a. A checkout session completes inside the agent with Google Pay when the store's profile lists the com.google.pay payment handler; otherwise hand the shopper the continue_url to hosted checkout. A member's share link is /<username>/products/<slug>; see /concepts/agentic-commerce, /concepts/poppy, /concepts/ucp and /concepts/a2a.
> After signup, to launch a merchant's store (back-office sync, payments onboarding, store setup, a theme copied from their current site, and a preview link before billing), follow /api/agent-launch.
> To host a small project on Fluid (a landing page, event page, calculator or dashboard), follow /sites/quickstart: npm create @fluid-app/fluid-site my-site (or npx @fluid-app/create-fluid-site my-site), fluid login, then fluid deploy prints the public URL. Launch a Site unless the project needs a custom domain, server rendering or heavy server code, which make it an App (a Mist app); /sites/site-or-app has the rule, and POST /api/company/v2026-10/project-launch-recommendations applies it. With only the Fluid MCP server (its Site write tools are limited to Fluid root admins today; see /sites/deploy-from-claude), use site_create, then site_deploy (from a chat with no shell, in one call with the files inline: site_template_get for a starter, then site_deploy with each path's content; or a built folder in two calls: send the manifest, PUT the listed uploads, call again with the bundle_id to get the url), then, only after the person confirms they want it public, site_visibility_set. site_logs, site_traffic, site_env_list/set/unset, site_seo_get/set and the site_branch tools cover logs, traffic, env vars, SEO and preview branches; a member builds their own Sites with the my_site_* tools. The MCP site_deploy tool publishes server functions sent inline that import nothing; publish functions with imports, and convert a Site to an App, with the fluid sites CLI. A Site can serve light server code: each functions/<name>.ts, declared in config/functions.json with access public, signed_in or key (and an optional UTC cron schedule), answers at /api/<name> on the Site's own host; publish it with fluid deploy, or inline through the MCP site_deploy tool when it imports nothing. See /sites/functions and /sites/rest-api.
> Lists use cursor pagination via the page[cursor] and page[limit] query params; follow meta.pagination.next_cursor until it is null.
> When the same operation exists on more than one surface, use the newest: dated API versions are newer than unversioned ones, and later dates win (v2026-04 > v2025-06 > unversioned v0/v1.1). Fall back to a legacy or unversioned operation only when no newer versioned equivalent exists — the company-v0 notes below list the known superseded operations. The same applies to /api/company/v1 and /api/v1/... paths: prefer a newer documented equivalent, and use one only when none exists (/api/v1.1/... is distinct and documented in company-v0). Use page/per_page offset pagination only on an operation whose spec documents those params — mostly the unversioned company-v0 admin surface, plus some lists on other surfaces, versioned ones included; page every other list with cursors.
> To create a URL redirect, create a custom route on the Sitemap: POST /api/theme_region_rules with redirect_type redirect, a redirect_url, region_code default, route_kind non_credit and redirect_status_code 301 or 302. See /themes/custom-routes#create-a-redirect-with-the-api. Never use /api/redirects; those legacy redirects are no longer used, and the admin's Sitemap screen doesn't show them.
> Fluid has three navigation APIs; don't mix them up. Storefront website menus (navigation bars, footers) are /api/menus and nested menu_items, in api-reference/content-v0.yaml (API Reference: Website > Navigation menus), with a how-to in themes/navigation-menus; their list uses flat page/per_page pagination. The Fluid mobile app's navigation is /api/v2/mobile_navigations, in api-reference/mobile-v2.yaml (API Reference: Mobile app > Navigation); its list also uses page/per_page. Portal navigations belong to a portal definition (Fluid OS), in api-reference/fluid-os-v0.yaml (API Reference: Portal > Portal navigation), and each has a platform of web or mobile.
> The OpenAPI specs under api-reference/ are the authoritative contracts; prefer them over prose when in doubt. api-reference/storefront-v2026-04.yaml covers the v2026-04 storefront surface (/api/v202604/... paths); api-reference/checkout-v2026-04.yaml covers the v2026-04 checkout surface (/api/checkout/v2026-04/... paths — carts, cart auth, discounts, items, subscriptions, orders, enrollments, and store config); api-reference/public-v2025-06.yaml covers the Public SDK surface used by the @fluid-app FairShare SDK, including its parallel cart lifecycle, browser integrations, versioned payment callbacks, unversioned public utilities, and the cart price-override operation; api-reference/payment-v2026-04.yaml covers the v2026-04 payment gateway admin surface (/api/payment/v2026-04/... paths, bearer-authenticated — gateway CRUD, gateway purchase/authorize/$0-verify, transaction list/show and capture/void/credit, and merchant payment configuration); api-reference/payments-v2026-04.yaml covers the v2026-04 cart payment surface (/api/payments/v2026-04/carts/{cart_token}/... paths, authenticated by the cart token in the path with no bearer — payment-method selection, VGS card tokenization, 3D Secure verification, and PayPal/Braintree/Klarna/Apple Pay flows); api-reference/commerce-v2026-04.yaml covers the v2026-04 commerce order-editing surface (/api/v202604/orders/{order_id}/edits paths, bearer-authenticated — post-checkout order edits that atomically insert items and add adjustments/discounts, with an optional dry-run preview); api-reference/webhooks-v0.yaml covers the unversioned webhooks surface (/api/... paths — webhook registration, delivery payloads, callback registrations, company events, and webhook/callback schemas); api-reference/company-v0.yaml covers the legacy unversioned company admin surface (/api/... paths, bearer-authenticated except two operations that take no credential, POST /api/company (create a company) and GET /api/agreements/{id} — company settings and management, customers, users, roles, subscription plans, subscription bundles, subscriptions, media, pages, catch-ups, inventory levels, domains, agreements, and admin order actions). company-v0 caveats: it is the legacy v0 admin contract and its lists use flat page/per_page offset pagination, which is expected there despite the general cursor-pagination rule; where an operation exists in both company-v0 and a versioned spec, prefer the versioned spec — the subscriptions lifecycle (list/create/show/update, cancel, pause, reactivate, resume, retry, skip, failed-cycle-waiver, discounts) and subscription bundles are superseded by checkout-v2026-04, and company pages/media CRUD plus the public pages, categories, products, and media list endpoints are superseded by storefront-v2026-04. Subscription plan management (/api/subscription_plans, resource-wrapped {"subscription_plan": {...}} bodies) exists only in company-v0. api-reference/members-v2025-06.yaml covers the v2025-06 unified Member identity surface (/api/v2025-06/members/... paths, bearer-authenticated — member list/create/show/update, lookup by email/username/external_id/legacy_customer_id, member-type assignment, and the sponsor genealogy read). Prefer it over the customers and reps surfaces when the member type matters: /customers does not serialize member_type. api-reference/analytics-v2026-04.yaml covers the v2026-04 Home dashboard analytics surface (/api/v202604/analytics/dashboard/... paths, bearer-authenticated — read-only endpoints for the Home > Overview, Home > Live, and Home > Field tabs, each accepting an optional country ISO alpha-2 query param that scopes aggregations to a single country).
> api-reference/analytics-v0.yaml covers the unversioned analytics surface that backs the fluid-admin Traffic tab (/api/analytics/... and /api/analytics/traffic/... paths, bearer-authenticated — the legacy shares/views/visitors summary plus traffic overview, ranked campaigns, sources, geographies, flows, and per-rep breakdown, all sharing one reporting-period contract).
> Successful responses wrap the resource payload alongside a top-level integer status and a meta object.
> Portal Definition authoring edits and synchronizes the portal JSON resource graph. Widget Package authoring builds either a company-owned or Droplet-owned Remote DOM package. These are separate contracts; do not imply that one defines the other.
> For Widget Package worker code, use only @fluid-app/portal-sdk/widgets/worker. Use only the Portal Definition and Widget Package workflows and public entry points documented here; do not infer support for undocumented surfaces.
> Every portal function and declarative capability used by a widget must appear in that widget's uses array. Use the same typed function value in uses; do not invent capability-name strings.
> Widget styling must use the portal's semantic theme variables for colors, typography, spacing, radii, borders, focus, and charts whenever a token represents the visual decision. Do not create a separate light or dark palette or duplicate theme controls as widget properties.
> Prefer worker-safe Fluid UI components exported by @fluid-app/portal-sdk/widgets/worker when they fit the interaction. When no exported component fits, use semantic HTML, accessible behavior, and the portal theme variables.
> A Portal Definition push updates the remote working definition. A portal version is an immutable snapshot, and activation is a separate live release operation.
> The Help Center (/help/...) is for merchants, admins and reps using Fluid. Its admin pages mirror the admin's routes: the screen at admin.fluid.app/settings/taxes is documented at /help/admin/settings/taxes. Use the Help Center for how-to questions about the admin, and the Developer Platform and API Reference for building integrations.
> Help Center pages describe what a company admin sees. A reader's role can hide screens and actions; admins manage roles on Settings > Roles (/help/admin/settings/roles). If someone can't find a screen or button, their role's permissions are the first thing to check.
> Send people who need Fluid support to /help/getting-help. Don't invent support email addresses, phone numbers or response times.

# Add, configure and open the Passport

> Add the Passport account menu to a theme, choose where it shows, configure its links, features, colors and words, open it from your own buttons and scripts, and see which of its features are live.

The Passport is the member's account menu. One panel holds their profile, addresses, payment methods, orders and subscriptions, their notifications, the Sites they can open, invitations to other members' Sites, and **Sign out**. On your storefront's theme pages, one `<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](https://docs.fluid.app/passport/overview.md).

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](https://docs.fluid.app/sites/passport.md).

## Add the Passport

Fluid adds the Passport's script to your storefront for you, as a global embed. It loads `https://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](https://docs.fluid.app/help/getting-help.md) 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>`:

```liquid layouts/theme.liquid theme={null}
<body>
  {{ content_for_layout }}
  <fluid-passport></fluid-passport>
</body>
```

With no attributes, the Passport is a 60px round button, 16px from the right edge and 152px from the bottom of the screen, above the store's chat and cart buttons. A signed-in member sees their avatar on it, and a click opens the panel. A guest sees the same round button with a person icon, and a click sends them to sign in.

* **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 with `placement="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

The `placement` attribute sets how the Passport shows:

| `placement` | What shows | Where the panel opens |
| - | - | - |
| `floating` (default) | The round button, fixed in a corner of the screen | From the button |
| `inline` | The button sits where the tag is, such as in your header | From the button |
| `none` | No button. Your theme opens the Passport from its own buttons | Beside the button that opened it |
| `off` | Nothing: no button, no session request, and it ignores every request to open | Never opens |

On a phone, the panel opens as a bottom sheet in every placement. See [How it behaves on phones](#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:

| Attribute | Values | Default |
| - | - | - |
| `position` | `top_left`, `top_right`, `bottom_left`, `bottom_right` | `bottom_right` |
| `size` | The button's diameter in pixels, from 32 to 120 | `60` |
| `x-margin` | Distance from the side edge in pixels, from 0 to 480 | `16` in the bottom-right corner, `40` elsewhere |
| `y-margin` | Distance from the top or bottom edge in pixels, from 0 to 480 | `152` in the bottom-right corner, `98` elsewhere |
| `z-index` | A whole number | `99999` |

For example, to put a smaller button in the bottom-left corner, clear of a chat button on the right:

```html theme={null}
<fluid-passport position="bottom_left" size="48" x-margin="24" y-margin="24"></fluid-passport>
```

The button keeps clear of a phone's notch and home indicator. The panel opens from the button and stays on screen. See [How it stays in view](#how-it-stays-in-view).

Your theme decides the corner. Members can't move the button, and the Passport doesn't read `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, set `placement="inline"` and put the tag where the button goes:

```liquid theme={null}
<header class="site-header">
  <a class="site-header__logo" href="/">Northwind Wellness</a>
  <nav class="site-header__nav" aria-label="Main">
    <a href="/shop">Shop</a>
    <a href="/about">About</a>
  </nav>
  <fluid-passport placement="inline" size="36"></fluid-passport>
</header>
```

An inline button is 40px unless you set `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, set `placement="none"` and give your own account button a `data-fluid-passport-open` attribute:

```html theme={null}
<fluid-passport placement="none"></fluid-passport>

<button type="button" class="site-header__account" data-fluid-passport-open>
  My account
</button>
```

Your button stays the way in, so the Passport checks for it:

* **One second after the page loads**, if no visible element has `data-fluid-passport-open` and nothing has opened the Passport, it falls back to `floating`: 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 itself `data-fam-fallback`.
* **Visible means drawn.** An opener counts unless it's off the page, hidden by CSS (`display: none` or `visibility: 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 calls `fluid.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

| Attribute | What it sets | Default |
| - | - | - |
| `sign-in-url` | Where a guest goes to sign in | `/auth/sign_in` |
| `sign-out-url` | Where **Sign out** goes, after the member confirms | `/auth/sign_out` |
| `checkout-url` | Your company's checkout, an absolute `https` URL. Each room's **Manage** opens the member's account there | `https://checkout.fluid.app` |

`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:

| Attribute | When on, the panel offers | Default |
| - | - | - |
| `address-edits` | Add an address, with suggestions as the member types, and edit, delete or set the default on a saved one | On |
| `subscription-controls` | **Manage** on each subscription: skip, pause, resume, cancel and reactivate it, and change its next bill date, quantity, card or shipping address | On |
| `account-edits` | **Set as default** and **Delete** on a saved card | Off |
| `order-detail` | An order's own page in the panel: status, shipments with tracking, items, totals, shipping and payment | Off |

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:

```html theme={null}
<fluid-passport account-edits subscription-controls="false"></fluid-passport>
```

* **A checkout of your own keeps all four on.** When `checkout-url` points anywhere but `https://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

| Attribute | What it does | Default |
| - | - | - |
| `site-menu` | Lists the member's Sites, pins and Site invitations, and adds the **Sites** room. `site-menu="false"` turns it off | Off |
| `current-site-id` | The public id of the Site the member is on. Its row leads the list and says "You're here" | None |

```html theme={null}
<fluid-passport site-menu></fluid-passport>
```

Without `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

| `color-scheme` | The Passport is drawn |
| - | - |
| `light` (default) | Light |
| `dark` | Dark |
| `auto` | Light or dark, following the visitor's device |

### Words

Every word the Passport shows can be replaced with a `<name>-label` attribute. A few you're likely to change:

| Attribute | Default |
| - | - |
| `account-label` | Your account (also the button's accessible name) |
| `sign-in-label` | Sign in |
| `sign-out-label` | Sign out |
| `profile-label` | Profile |
| `addresses-label` | Addresses |
| `payment-methods-label` | Payment methods |
| `orders-label` | Orders |
| `subscriptions-label` | Subscriptions |
| `all-sites-label` | All sites |
| `open-full-page-label` | Manage |

```html theme={null}
<fluid-passport account-label="Mon compte" sign-out-label="Se déconnecter"></fluid-passport>
```

A label with a placeholder keeps it, such as `{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.

You don't set any of this, and your theme can't turn it off.

## 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. With `prefers-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's `overflow: 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 at `z-index: 99999`. Set the `z-index` attribute 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 a `floating` 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:

| Room | Opens on |
| - | - |
| `profile` | The member's name, email, phone and language |
| `addresses` | Their saved addresses |
| `payment-methods` | Their saved cards |
| `orders` | Their latest orders |
| `subscriptions` | Their subscriptions |
| `sites` | Every Site they can open, only with `site-menu` |
| `notifications` | Their notifications, only while the member has any |

Any other value opens the list.

### From a button or link

A click on any element with `data-fluid-passport-open` opens the Passport, or closes it when it's open. The attribute's value, if any, names the room:

```html theme={null}
<button type="button" data-fluid-passport-open>My account</button>
<button type="button" data-fluid-passport-open="orders">My orders</button>
```

The opener can be a link too. A link keeps its `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 `floating` or `inline`, 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 adds `fluid.passport` to the page, next to anything else already on `window.fluid`:

```js theme={null}
fluid.passport.open();
fluid.passport.open({ room: "orders", anchor: document.querySelector(".site-header__account") });
fluid.passport.toggle({ room: "subscriptions" });
fluid.passport.close();
fluid.passport.isOpen; // true while the panel is open
```

* `open` and `toggle` take `room`, a room from the table above, and `anchor`, the element focus returns to on close. With `placement="none"`, the panel also opens beside `anchor`, unless it's hidden.
* Without an `anchor`, a `placement="none"` panel opens beside the first visible `data-fluid-passport-open` element, or from the corner `position` names when there's none.
* `toggle` closes an open panel, whatever room or anchor it names.
* For a guest, `open` and `toggle` send 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 second `toggle`, made before then cancels it.
* `isOpen` is read-only, and so is `fluid.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 call `fluid.passport` from a script that may run first, put this stub before it:

```html theme={null}
<script>
  window.fluid = window.fluid || {};
  fluid.passport = fluid.passport || {
    q: [],
    open: function (o) {
      this.q.push(["open", o]);
    },
    close: function () {
      this.q.push(["close"]);
    },
    toggle: function (o) {
      this.q.push(["toggle", o]);
    },
  };
</script>
```

Then call `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 on `window`, with the same `room` and `anchor` in `detail`:

```js theme={null}
window.dispatchEvent(new CustomEvent("fluid-passport:open", { detail: { room: "orders" } }));
window.dispatchEvent(new CustomEvent("fluid-passport:toggle"));
window.dispatchEvent(new CustomEvent("fluid-passport:close"));
```

The Passport fires `fluid-passport:opened` and `fluid-passport:closed`, which bubble to `window`, with the room in `detail.room`:

```js theme={null}
window.addEventListener("fluid-passport:opened", (event) => {
  console.log("Passport opened on", event.detail.room ?? "the list");
});
```

When the signed-in member changes, because another tab signed in, signed out or switched member, the Passport fires `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:

| Attribute | Values |
| - | - |
| `data-fam-state` | `pending` until the session answers, then `member`, `guest` or `failure`. `off` with `placement="off"` |
| `data-fam-placement` | The placement in effect: `floating`, `inline`, `none` or `off` |
| `data-fam-fallback` | Present when a `placement="none"` Passport found no opener and fell back to `floating` |

For example, to show a header link only to guests, and hide the Passport on a landing page:

```css theme={null}
.site-header__join { display: none; }
.site-header:has(fluid-passport[data-fam-state="guest"]) .site-header__join { display: inline-flex; }

.landing fluid-passport { display: none; }
```

A rule that hides `<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 `href` follows 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.

There is no older Passport to fall back to. So give your openers an `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.

| Feature | Status |
| - | - |
| The Passport panel, built on Fluid's design system | Live where member sign-in is on |
| `floating`, `inline`, `none` and `off` placements, the corner attributes and `z-index` | Live |
| Openers, `fluid.passport`, the stub and the open and close events | Live |
| `color-scheme`, `checkout-url`, `sign-in-url`, `sign-out-url` and every `<name>-label` | Live |
| Phone bottom sheet | Live |
| Profile: see it | Live |
| Profile: edit name and language | Live where your company has member sites on |
| Addresses: see them | Live |
| Addresses: add, edit, delete, set the default (`address-edits`) | Live where your company has member sites on. On by default |
| Address suggestions as the member types | Turned on for your company by Fluid |
| Payment methods: see them | Live |
| Payment methods: set the default, delete (`account-edits`) | Live when you turn it on, where your company has member sites on. Off by default |
| Payment methods: add a card | On the checkout only |
| Orders: the latest, with **Load more** | Live |
| Orders: an order's own page (`order-detail`) | Live when you turn it on. Off by default |
| Subscriptions: see them, with **Load more** | Live |
| Subscriptions: actions and edits (`subscription-controls`) | Live where your company has member sites on. On by default |
| Sites, pins and the **Sites** room, ten Sites a page (`site-menu`) | Live where your company has member sites on |
| Site invitations: accept, decline, undo | Live with `site-menu`, where your company has member sites on |
| Notifications | Live where your company has member sites on |
| **This site**, **Edit in Mist** and **Open Mist** | Live where your company's reps have Mist |
| A member choosing where the button sits | Removed. Your theme sets the corner |
| Mist usage, and plan and billing | Not in the web Passport. Mist only |

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](#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](#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](#configure-it).
* **Don't assign `fluid.passport`.** Use the [stub](#before-the-script-loads), 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:

```liquid theme={null}
<header class="site-header">
  <a class="site-header__logo" href="/">Northwind Wellness</a>
  <fluid-passport placement="inline" site-menu></fluid-passport>
</header>
```

```html theme={null}
<a href="https://shop.example.com/account" data-fluid-passport-open="orders">Track my order</a>
```

Then check:

1. The page has exactly one `<fluid-passport>` and loads the Passport's script once.
2. The theme doesn't also show a `{% member_account %}` menu where the Passport should be.
3. Signed in, a click opens the panel, and **Escape** closes it and puts focus back.
4. Signed out, the visitor sees the round sign-in button, and an opener sends them to sign in.
5. At a phone width, under 640px, the panel opens as a bottom sheet that closes when pulled down.
6. In a short window, all of the panel stays on screen and its content scrolls.
7. With `placement="none"`, the theme's opener is visible to guests and members, and no corner button shows up a second after load.
8. With the Passport's script blocked, `<fluid-passport>` has `data-fam-state="failure"` and the opener link goes to its `href`.

On a Site, call `fluid.auth.openPassport()` from a click instead, and check it on the published Site. See [Passport and sign-in](https://docs.fluid.app/sites/passport.md#for-agents).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.