diff --git a/resources/views/docs/mobile/4/edge-components/icon.md b/resources/views/docs/mobile/4/edge-components/icon.md index f5dcf4a4..9ddcd00a 100644 --- a/resources/views/docs/mobile/4/edge-components/icon.md +++ b/resources/views/docs/mobile/4/edge-components/icon.md @@ -143,7 +143,7 @@ php artisan native-ui:generate-icons Every icon name — whether passed to `` or to the `icon` attribute of any other EDGE component — goes through a four-tier resolution strategy: -1. **Direct platform icons** - On iOS, if the name contains a `.` it's used as a direct SF Symbol path (e.g., `car.side.fill`). On Android, any Material Icon ligature name works directly (e.g., `shopping_cart`) +1. **Direct platform icons** - On iOS, a name that contains a `.` (e.g., `car.side.fill`) or is already an SF Symbol name (e.g., `heart`, `phone`) is used as written. On Android, any Material Icon ligature name works directly (e.g., `shopping_cart`) 2. **Manual mapping** - Explicit mappings for common icons and aliases (e.g., `home`, `settings`, `user`) 3. **Smart fallback** - Normalizes unmapped icon names to a platform equivalent 4. **Default fallback** - Uses a circle icon if no match is found @@ -176,6 +176,21 @@ underscores (`archive-box` → `archivebox`). It deliberately does **not** guess SF Symbols ship their plain glyph at the bare name, so when you want the filled variant, ask for it explicitly (`archivebox.fill`, or the `Ios::ArchiveboxFill` enum case). +A name that is already an SF Symbol bypasses the mapping too , so `heart`, `phone` +and `star` draw those outline symbols. Before 4.9 they went through the mapping, which drew most of them filled. For +the filled variant, ask for it by name (`heart.fill`, or `Ios::HeartFill`) or use an alias that maps to it +(`favorite` → `heart.fill`). On Android, a shared `heart` or `star` draws the filled Material icon, so give each platform +its own name when both should match: + +@verbatim +```blade +@use('App\Icons\Ios') +@use('App\Icons\AndroidOutlined') + + +``` +@endverbatim + ### Android (Material Icons) On Android, icons render using a lightweight font-based approach that supports the entire Material Icons library. You @@ -361,7 +376,15 @@ Naming an icon after the system icon it stands in for gives you a sensible fallb ## Icon name reference -All icons listed here are manually mapped and guaranteed to work consistently across iOS and Android. +Every name listed here works on both iOS and Android. Most are aliases that map to a platform icon. Some are also SF +Symbol names, and on iOS those draw that SF Symbol as written (see [How names resolve](#how-names-resolve)): + +- `bell`, `bolt`, `bookmark`, `camera`, `cart`, `clock`, `folder`, `heart`, `lightbulb`, `lock`, `map`, `message`, + `person`, `phone`, `photo`, `receipt`, `star` and `video` draw the outline symbol on iOS and the filled Material icon + on Android. +- `forward`, `info`, `mail`, `smartphone` and `speaker` draw a different symbol on iOS from the one Android draws. For + matching icons, use `chevron_right`, `about`, `email`, `device-phone-mobile` and `speaker-wave` instead. `location` + draws the location arrow on iOS and a map on Android. ### Navigation