AurumIconButton
Aurum's icon-only button primitive.
| family | Buttons |
|---|---|
| platform | iOS 17+ · SwiftUI |
| source | Sources/Aurum/Component/Button/AurumIconButton.swift |
| snapshots | 1 baselines · iPhone 17 Pro · iOS 26.5 |
Aurum's icon-only button primitive. The SwiftUI port of aurum-android's
AurumIconButton.
Guarantees a 44 pt minimum touch target (the HIG floor; Android's M3
wrapper reserves 48 dp) even when the visible glyph is smaller. The
content slot typically renders an AurumIcon; the caller controls the
icon size and tint via AurumIcon's parameters. Pressed dims the glyph —
the analogue of M3's ripple for an icon-only affordance.
Intended use
Use as a top-bar action affordance, dense list-row trailing action, or any spot where a labelled button would crowd the layout. The 44 pt touch target is maintained even when the visible glyph is smaller. For label-bearing actions reach for AurumButton; for low-emphasis text actions use AurumLinkButton.
Do
- Provide an explicit
accessibilityLabelon the innerAurumIcon— icon-only buttons fail accessibility audits without one. - Use as the trailing-icon slot inside headers / list rows where space is constrained.
- Pick monosemic icons (close, more, edit) — never decorative ones whose meaning shifts by context.
Don’t
- Use as the screen's primary CTA — icon-only buttons read as utility, not commitment; use
AurumButtonfor that. - Cluster more than 2
AurumIconButtons in a row without grouping under an overflow affordance — three is overflow territory. - Rely on an automatic disabled wash — tint the inner
AurumIconwith the disabled colour yourself (matches Android's preview convention).
Snapshots
Recorded on the pinned simulator — iPhone 17 Pro · iOS 26.5 · Xcode 26.6.