Pages and components

Try live
The UI every capability ships with: packaged pages, the app shell, one gate and one notices region, styled defaults on tokens, headless composables with bindings, copy-in source, and an accessibility contract to WCAG 2.2 AA.

Every capability of the backend comes with its UI. Install the module and your app has sign-in, pricing, settings, profile, security and an admin console, with nothing to write. The same parts are components you place in your own pages, and composables you can build any markup on. Nuxt gives you pages, layouts and components; the package adds the pages and components a client app needs, styled defaults you restyle with tokens, headless state with accessibility bindings, and source you can eject.

What you get

  • Packaged pages, each at a path its pages key sets, moved with a string or turned off with false, with the route rules a private page needs.
  • The app shell: <AppShell> puts your brand, the workspace switcher, the notification bell and the account menu around your pages.
  • One gate: <Gate> shows a region only to someone signed in, with a role, in a workspace, with a plan's feature or with room on a quota.
  • One notices region: <BackendNotices> shows an administrator's visit, maintenance, a past-due payment, low credits, a gift to claim and the rest, most important first.
  • Styled defaults: .vue components themed by --bk-* tokens on :root inside @layer nuxt-backend, with state as data-* attributes. The CSS loads only for the capabilities you use, and css: false loads none.
  • Headless composables: state, actions and bindings that carry the accessibility attributes, plus the helpers in #backend/a11y.
  • Every word a label, changed in app config or translated with @nuxtjs/i18n, the emails included.
  • An accessibility contract to WCAG 2.2 AA that every component keeps and the package's tests hold it to.

How it works

A packaged page is a thin wrapper around one component, inside one shared frame: the <main> landmark, the title and h1 from its labels, the notices region, and a status region for the connection. The component is built from named parts and reads the same composables you would (useLoginFlow, usePricing, useWorkspace and the rest). Every element carries a data-* attribute that the stylesheet and your CSS select.

What a component shows follows what the server allows. A member who manages no billing sees no checkout button, a signed-out visitor gets a sign-in link, and a page guard answers with a 403 that renders <AccessDenied>. The pricing page renders on the server from the live catalog, so its prices cannot drift from what checkout charges.

The components lean on the platform: a native <dialog> for the confirm-it's-you prompt, the native popover for the shell's menus, radios in a fieldset for the monthly and yearly switch, and Intl for every date and amount in the reader's locale. The package depends on no UI library and works next to any of them.

Change what you outgrow

Take the lowest rung that does the job. Each keeps everything above it with the package:

RungYou changePage
1. MountnothingPackaged pages
2. Tokenscolours, radii and surfaces, everywhere at onceRestyle with tokens
3. Labelsany word, in any languageChange copy and labels, Translate the UI
4. Slotsone region of one placementCustomize with slots
5. Swap a partone part everywhere, or a whole pageSwap a part
6. Headlessall the markup, on the composables' bindingsBuild on the composables
7. Ejectthe source of a part, page or emailEject a part, page or email

The customization ladder explains how to choose, and why there is no unstyled component layer.

In development and in production

  • In development the pages run against your dev deployment and the providers' test modes: sign in with a code from the terminal, and buy a plan in the billing sandbox with a test card (Develop on real sandboxes).
  • In production there is nothing to switch on. Private pages stay out of search indexes, sitemaps and caches at their paths (Caches).
  • Contrast. The default colours pass WCAG 2.2 AA in the light and the dark scheme; colours of your own must too (Accessibility).

The demo mounts the module's pages next to Panels: pricing, settings, profile, security and gifts.

The inventory

What the package ships for this part of the app today, generated from the code: each name links to its reference entry.

Pages
/accept-invitation/legal/accessibility/admin/gifts/invite/account/keep/login/pricing/legal/privacy/profile/r/:code/report/security/settings/legal/subprocessors/legal/terms/unsubscribe/waitlist/welcome
Components
<AuthForm><WaitlistForm><ReauthenticateDialog><ProfileSettings><SecuritySettings><ConsentPrompt><OnboardingFlow><ActivationChecklist><HowDidYouHear><AccountData><WorkspaceSettings><AcceptInvitation><AuditLog><PricingTable><BillingCheckoutLink><BillingPortalLink><BillingHistory><UsageHistory><UpgradePrompt><CancelFlow><WithdrawalButton><GiftForm><GiftList><ReferralCard><AdminUsers><AdminWorkspaces><Gate><BackendNotices><AccessDenied><ConnectionStatus><UploadField><NotificationInbox><ContactForm><AppShell><AiLabel><LegalProcessors><LegalStorage><LegalDetail><LegalVersion><LegalContactPoints><LegalModeration>
Composables
useAppShelluseBackendConfiguseLabelsuseBackendPagePath

In this section

Packaged pages

Every page, its key and guard, the frame, and how to move one or turn it off.

Build the app shell

<AppShell>: your brand, the workspace switcher, the bell and the account menu.

Show parts of a page to the right people

<Gate> for a sign-in, a role, a workspace, a plan's feature or a quota.

Show app-wide notices

<BackendNotices>: every notice the backend raises, in one region.

Accessibility

What the components guarantee under WCAG 2.2 AA, and what a replacement keeps.

Customize

The ladder from tokens to ejected source, one page per rung.