<username>.cskn.my/<slug>), the platform can draw the visitor’s own menu over your app. It belongs to the platform, not to your app:
- signed in: an avatar button that opens the visitor’s apps as a grid, Marketplace, Studio, their own page, their followers and following, and Log out
- signed out: a “Sign in” button
The menu is hidden by default. Nothing appears until your app asks for it.
Show it
With @cskn/ui, render<PlatformMenu />. It shows the menu while it is mounted and dresses it in your app’s theme. Without the UI kit, use the SDK:
Outside a user page
On your app page (<slug>.cskn.app), inside a shell, or on a dev server there is no menu. platformMenu.isAvailable() returns false and every call is a no-op, so you can call it unconditionally.
On a user page opened inside a shell, a signed-out visitor sees nothing: signing in is the shell’s job.
Methods
Options
A corner of the viewport, or
slot: inside an element of yours.For
placement: 'slot', the element (or a selector for it) the button goes into, such as a spot in your header.floating has a shadow and an outlined Sign in button. flat has no shadow and a Sign in button filled with accent, for a menu that sits in a toolbar.Which built-in parts show. All are on unless set to
false: apps (the visitor’s identity and apps grid), marketplace, studio, profile (“My page”), follows, logout.Override any built-in string by key, such as
signIn, myApps or logout. The menu is in English or Turkish, following <html lang>.Style
Every key takes any CSS value. Unset keys keep the menu’s own light or dark palette.Items
An emoji or other glyph, an image URL, or one of
store, grid, user, users, logout, lock, search, link.Makes the item a link. Without
href the item only fires onSelect and closes the menu.start puts the item above everything else. end puts it just before Log out.Behavior
- Below 640 px the panel opens as a bottom sheet.
- Escape closes the panel and returns focus to the avatar button. Arrow keys move between items.
- Log out asks for confirmation first, with an option to end every session on the device.