ComponentsButtons & ActionsNotification Button

Buttons & Actions

Notification Button

A notification-only icon button for the builder. It is dedicated to opening BuilderNotificationModal and showing unread count as a badge, with no generic action map behavior.

Component typeNotification-only trigger

Purpose-built for notification modal opening and unread badge display.

Allowed iconsnotifications · mail · alert-circle

Icon choices are intentionally restricted to three notification-relevant options.

Legacy compatibilityMigrated + normalized

Handles old icon-button keys and normalizes legacy size/icon values safely.

What it does

Four things worth knowing

Notification modal trigger only

In preview mode, pressing the button opens BuilderNotificationModal and does not route through generic actions like URL or screen navigation.

Unread badge integration

Receives unread count updates through the modal callback (onUnreadCountChange) and reflects state in badge UI.

Runtime normalization for old data

Legacy numeric sizes are mapped to small/medium/large, and invalid icon values fallback to notifications.

Backwards key migration exists

Old saved icon-button components are migrated to notification-button during rehydration.

Code map: component in BuilderNotificationButton.tsx, registry key notification-button, property-editor icon behavior in ComponentPropertyEditor.tsx, migration in rehydrateComponents.ts, and current legacy canvas sizing under componentDimensions.ts case ‘icon-button’.

Builder setup

Find it, drop it, open notifications

Where to find itAdd Notification Button

  1. Add Notification Button from builder components.
  2. Place it on the target screen.
  3. Open preview mode and tap to open the notification modal.

Before you publishThree things to check

  1. Choose one of the three allowed icons: notifications, mail, or alert-circle.
  2. Set size to small, medium, or large and confirm badge colors are readable.
  3. Validate modal title/subtitle text and preview opening behavior before publishing.
Category: Buttons & ActionsComponent: BuilderNotificationButtonRegistry key: notification-buttonLegacy migration: icon-button → notification-button
Props

Editable notification button properties

PropTypeDefaultDescription
iconNameselectnotificationsAllowed values: notifications, mail, alert-circle.
sizeselectmediumAllowed values: small, medium, large (legacy numeric values normalized).
backgroundColor, iconColor, borderRadius, borderWidth, borderColorstyleRegistry defaultsCore surface, icon tint, and outline styling for the button.
badgeColor, badgeTextColorstyleRegistry defaultsUnread badge background and count text colors.
notificationTitle, notificationSubtitle, notificationShowSubtitlestring / booleanRegistry defaultsModal header content shown when notification modal opens.
isPreview, modal callbacks, unread callbackruntimeInjectedControls preview-only opening and unread count synchronization from modal.
Toggles & colours

Make it yours

This component stays intentionally minimal and notification-focused. Customize icon, size, modal header copy, and badge/surface styling only.

PropDefaultWhat it controls
iconName, sizenotifications, mediumIcon choice and overall button footprint for notification trigger placement.
backgroundColor, iconColorRegistry defaultsPrimary contrast and readability of the notification icon button.
borderRadius, borderWidth, borderColorRegistry defaultsEdge shape and outline style.
badgeColor, badgeTextColorRegistry defaultsUnread badge visibility and count readability.
notificationTitle, notificationSubtitle, notificationShowSubtitleRegistry defaultsModal heading copy shown when opening notifications.
Tips

Common troubleshooting notes

Component not found: icon-button

Old saved key detected. Rehydration migration handles icon-button → notification-button; do a full app reload so rehydration runs.

TypeError around size map lookup

Usually caused by old numeric size values. Ensure getNormalizedSize runs before size-map usage.

Unexpected icon appears

Legacy invalid icon values should be normalized by getNormalizedIcon and fallback to notifications.

Keep all change points synced

When modifying this component, update component props, registry defaults/definitions, rehydrate migration, property editor icon handling, and source collection bundle sync.