Pages and components
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
pageskey sets, moved with a string or turned off withfalse, 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:
.vuecomponents themed by--bk-*tokens on:rootinside@layer nuxt-backend, with state asdata-*attributes. The CSS loads only for the capabilities you use, andcss: falseloads 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:
| Rung | You change | Page |
|---|---|---|
| 1. Mount | nothing | Packaged pages |
| 2. Tokens | colours, radii and surfaces, everywhere at once | Restyle with tokens |
| 3. Labels | any word, in any language | Change copy and labels, Translate the UI |
| 4. Slots | one region of one placement | Customize with slots |
| 5. Swap a part | one part everywhere, or a whole page | Swap a part |
| 6. Headless | all the markup, on the composables' bindings | Build on the composables |
| 7. Eject | the source of a part, page or email | Eject 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
Experiments
Split signed-in people between two versions of a page or an offer with a variant flag, record who saw which, count each variant's conversions and guardrails in the admin console, and run price tests only as disclosed discounts.
Pages
Every page the module mounts, its pages key, who can open it and the component behind it; the frame around each; how to move one or turn it off with pages.<key>: false; and how search engines and caches treat them.