1 viewer
Component · Input
EnablePush
User-gesture-tied button that registers the service worker, prompts for notification permission, subscribes via PushManager, and persists the subscription on the runtime.
- Category
- Input
- Slots
- 1
- States
- 2
- Writer
- Legacy
Preview
<EnablePush busyLabel="Requesting Browser Permission..." label="Enable Real-Time Notifications" > <Button intent="primary" label="Enable Real-Time Notifications" /> </EnablePush>
Anatomy
The named parts of the rendered markup. Recipes style these hooks, and every renderer keeps them stable.
| Slot | DOM class |
|---|---|
| root | .primitive-enable-push |
States and platforms
The states the contract publishes, the platforms it declares, and the style recipes that dress it.
States
Platforms
Recipes
Renderers
The example above still needs shared writers for: EnablePush.
Declared adapters. A status is the manifest's declaration, not a measured parity result.
| Target | Renderer | Status |
|---|---|---|
| web | react | experimental |
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.