Account menu

A disclosure for one account identity, with route links and a sign-out action.

The server signs out a fixed demo identity and can restore it.

Open in new tab

Each preview is its own Live page in a frame, because this site is a Vue 3.5 app built on the Pulsar starter kit. An open list or popover stays inside its frame; in your application it opens over the page.

Installation

bash
suprnova live:add account-menu

Usage

html
{% import "suprnova-ui/account-menu/account-menu.html" as account_menu %}
{% call menu::account_menu("account", "Ada Lovelace", "AL") %}{% call menu::account_link("/docs/live", "Live manual") %}{% endcall %}{% endcall %}

Examples

Route links

A native account disclosure with plain links and no server action.

Open in new tab

Keyboard and accessibility

suprnova.account-menu - the signed-in principal's menu (NAV-005). Classification: stitch slot under RenderCache. The menu names the principal, so its markup belongs to one identity and never enters a shared cached shell; an application mounts it as its own identity-bound island and the stitched document carries one slot for it. The disclosure is a native details element, the entries are anchors, and signing out is a form that posts with the session's CSRF token, so the menu works before any script runs.

API reference

account_menu

ParameterDefaultDescription
idRequiredUnique disclosure ID.
nameRequiredDisplay name of this account identity.
initialsRequiredShort avatar text, hidden from assistive technology.
label"Account"Accessible name of the account disclosure and its list.

account_link

ParameterDefaultDescription
hrefRequiredReal destination URL.
textRequiredVisible destination name.

account_sign_out

ParameterDefaultDescription
actionRequiredPOST destination that signs out the account.
tokenRequiredCurrent session CSRF token, submitted as _token.
text"Sign out"Visible sign-out button text.