component
alert
Inline alert: informational, positive, destructive; optional caller actions.
alertbannernoticefeedbackstatusshadcn

On iPad
The same installed source at a regular width. It adapts its layout without a separate design.


Install
With the sweetui tool (brew install mangobyte-dev/tap/sweetui):
sweetui install alert --destination Sources/YourFeature/ComponentsInstalls in order: button 0.5.2, alert 0.2.1. Point --destination at a folder inside the consuming target's sources.
Usage
InlineAlert(
"Card delivery delayed",
message: Text("Your new card now arrives on Thursday.")
)
InlineAlert(
"Payment failed",
message: Text("The card on file was declined.")
) {
Button("Retry") {}
.buttonStyle(.registry)
}
.registryVariant(.destructive)Accessibility contract
- Symbol-color pair; MUST NOT rely on color alone.
- Title+message: one element. Buttons: separate, activatable.
- VoiceOver skips symbol; title MUST name outcome.
- MUST NOT interrupt; required answers SHOULD use .alert.
Details
| Kind | component |
| Version | 0.2.1 |
| Platforms | iOS 26.0+ |
| Dependencies | button |
| Source | Registry/sources/components/InlineAlert.swift |
| Xcode preview | Inline Alert |