Skip to main content
The same bundle is served in several places. Two questions decide what your app should render: which page is this, and is there a native shell around it.

App page vs. user page

The app page is the tool; the user page is the creator’s public output from that tool (their blog, their gallery, their CV). Most apps render something quite different on each:

Shell vs. browser

A native shell (the cskn mobile, desktop or TV app) attaches a message bridge at window.cskn.bridge. A plain browser has none.
For finer detail, getPlatform() / usePlatform() return the host kind and the operating system:
In a React tree wrapped in UIProvider, useUI() gives you the same information synchronously, plus isTV and the live safe-area insets. See UIProvider.

What changes per surface

In a shell the user’s token arrives over the bridge. In a browser the user is signed in with a cookie on the app’s own domain. useBridgeAuth handles both. See Authentication.
Some bridge calls have a browser fallback (photo capture falls back to a file picker, notification permission falls back to Web Push), some resolve to not_available, and a few never resolve without a shell. Check the availability table before calling one from code that also runs in a browser.
Mobile and desktop shells draw a native header above your page. In a browser and on TV there is none, so you draw your own. NativeHeader from @cskn/ui picks the right one for you.
TV has no touch and no pointer, only a remote. @cskn/ui runs a spatial navigator there so arrow keys move focus between controls. See TV navigation.