Feedback/DSNoticeBar

DSNoticeBar

feedback
since 1.2.0

Banner notice with icon, title, optional message, link, and dismiss button.

iOSmacOS

Purpose

Use for persistent notifications, announcements, or contextual messages at the top of screens.

Variants

Info

.info

Blue with info icon

Success

.success

Green with checkmark icon

Warning

.warning

Yellow with warning icon

Error

.error

Red with error icon

Props

PropTypeDefaultDescription
styleDSNoticeBarStyle.infoStyle: .info, .success, .warning, or .error
iconString?nilOptional SF Symbol (defaults to style icon)
titlereqStringโ€”Notice title
messageString?nilOptional body text
linkTextString?nilOptional action link text
linkAction(() -> Void)?nilAction for link tap
onDismiss(() -> Void)?nilIf set, shows close button

Examples

Update notice

Announcement with action link.

swift
DSNoticeBar(
    style: .info,
    title: "New version available",
    message: "Update now to get the latest features.",
    linkText: "Update",
    linkAction: { updateApp() },
    onDismiss: { hideNotice() }
)

Warning banner

Warning notice without dismiss.

swift
DSNoticeBar(
    style: .warning,
    title: "Maintenance scheduled",
    message: "Service will be unavailable on Sunday 2-4 AM."
)

Usage Guidelines

  • Use at top of screen or section for visibility
  • Include dismiss button for non-critical notices
  • Keep title short and message concise
  • Use appropriate style for message severity

Related Components