# PulsoIcon for iOS and macOS (SwiftUI) [← All platforms](../README.md) · [pulsoicon.com](https://pulsoicon.com): browse all icons, try them live and copy the code The 9955 PulsoIcon icons for SwiftUI, with the same props and motion as [`pulsoicon-react`](../packages/react). iOS 17, macOS 14, tvOS 17, watchOS 10, visionOS 1 or newer. ## Install Xcode → File → Add Package Dependencies → `https://github.com/CityPulso/PulsoIcon.git`, or in `Package.swift`: ```swift .package(url: "https://github.com/CityPulso/PulsoIcon.git", from: ""), // and in your target: .product(name: "PulsoIcon", package: "PulsoIcon"), ``` ## Quick start ```swift import PulsoIcon Button { /* … */ } label: { Label { Text("Notifications") } icon: { PulsoIconView(.bell, size: 20) } } ``` ## Parameters `PulsoIconView(_ icon:size:color:strokeWidth:absoluteStrokeWidth:solid:animated:autoAnimated:play:handle:label:)` | Parameter | Default | Description | | --------------------- | ---------------- | ------------------------------------------------------------------------------------------ | | `icon` | | The icon, e.g. `.bell` | | `size` | `24` | Width and height in points | | `color` | foreground style | Stroke colour, and fill colour when `solid` | | `strokeWidth` | `2` | Stroke width on the 24-unit grid | | `absoluteStrokeWidth` | `false` | Keep the stroke the same number of points at any size | | `solid` | `false` | Filled icon instead of outline | | `animated` | `true` | `false` keeps the icon completely still | | `autoAnimated` | `true` | Play while a pointer hovers the icon (iPad, Mac, visionOS) | | `play` | `nil` | `true` plays the motion, `false` returns to rest | | `handle` | `nil` | A `PulsoIconHandle`; `await handle.startAnimation()` / `stopAnimation()` play it from code | | `label` | `nil` | Read by VoiceOver; without it the icon is hidden from accessibility | Taps are the app's to decide: set `play` or call the handle from the button's action. Nothing moves with Reduce Motion on. ## Finding icons Icons are static members of `PulsoIcon` named like the React components with a lowercase first letter (`.calendar`, `.trash2`, `.brandGithub`, `.aArrowDown`), with the same other names and `Icon` suffixes (`.bellIcon`). `PulsoIcon.byKey("bell")` looks an icon up by the kebab-case name stored on your data, and `PulsoIcon.iconNames` lists them all. ## Developing `Sources/PulsoIcon/Icons/` is generated by `npm run gen` at the repository root. `swift test` checks every icon and recipe against `packages/core`.