Skip to content
1 viewer
View
Component · Input

EnablePush

cre8.primitive.enable-push

User-gesture-tied button that registers the service worker, prompts for notification permission, subscribes via PushManager, and persists the subscription on the runtime.

Edit live
Category
Input
Slots
1
States
2
Writer
Shared

Preview

Live renderShared SSR + WASM writers
<EnablePush
  busyLabel="Requesting Browser Permission..."
  label="Enable Real-Time Notifications"
>
  <Button intent="primary" label="Enable Real-Time Notifications" />
</EnablePush>
Change this declaration and watch it render:open EnablePush in the playground

Anatomy

The named parts of the rendered markup. Recipes style these hooks, and every renderer keeps them stable.

SlotDOM class
root.primitive-enable-push
1 row

States and platforms

The states the contract publishes, the platforms it declares, and the style recipes that dress it.

States
disabledloading
Platforms
web
Recipes
unstyledruntime-console

Renderers

Shared writer
EnablePush renders through the one writer the server and the WASM DOM share, so both emit the same markup.

Every tag in the example above renders through a shared writer.

Declared adapters. A status is the manifest's declaration, not a measured parity result.

TargetRendererStatus
webreactexperimental
1 row

Accessibility

Native button with a live-region status surface that announces the enrollment outcome.

  • Click handler MUST run inside a user gesture so the browser will honor Notification.requestPermission().
  • Status text is announced through role=status for success and role=alert for failure so assistive tech picks up the result.