You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: resources/views/docs/mobile/2/edge-components/icons.md
+79-13Lines changed: 79 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,15 @@ handles the platform translation automatically.
14
14
15
15
## How It Works
16
16
17
-
The icon system uses a three-tier resolution strategy:
17
+
The icon system uses a four-tier resolution strategy:
18
18
19
-
1.**Manual Mapping** - Explicit mappings for common icons and aliases (e.g., `home`, `settings`, `user`)
20
-
2.**Smart Fallback** - Attempts to auto-convert unmapped icon names to platform equivalents
21
-
3.**Default Fallback** - Uses a circle icon if no match is found
19
+
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`).
20
+
2.**Manual Mapping** - Explicit mappings for common icons and aliases (e.g., `home`, `settings`, `user`)
21
+
3.**Smart Fallback** - Attempts to auto-convert unmapped icon names to platform equivalents
22
+
4.**Default Fallback** - Uses a circle icon if no match is found
22
23
23
-
This approach means you can use intuitive icon names and get consistent results across iOS and Android, even when the
24
-
underlying platform icon names differ.
24
+
This approach means you can use intuitive icon names for common cases, leverage direct platform icons for advanced use
25
+
cases, and get consistent results across iOS and Android.
25
26
26
27
## Platform Differences
27
28
@@ -39,15 +40,60 @@ If an icon name isn't manually mapped, the system attempts to find a matching SF
39
40
40
41
### Android (Material Icons)
41
42
42
-
On Android, icons render as Material Icons with automatic support for filled and outlined variants. The filled variant
43
-
is used by default in most components, but components like bottom navigation can switch between filled (selected) and
44
-
outlined (unselected) states.
43
+
On Android, icons render using a lightweight font-based approach that supports the entire Material Icons library. You
44
+
can use any Material Icon by its ligature name directly (e.g., `shopping_cart`, `qr_code_2`).
45
45
46
-
Manual mappings convert common icon names to their Material Icon equivalents. For example:
46
+
Manual mappings provide convenient aliases for common icon names. For example:
47
47
48
-
-`home` → `Icons.Filled.Home`
49
-
-`settings` → `Icons.Filled.Settings`
50
-
-`check` → `Icons.Filled.Check`
48
+
-`home` → `home`
49
+
-`settings` → `settings`
50
+
-`check` → `check`
51
+
-`cart` → `shopping_cart`
52
+
53
+
## Direct Platform Icons
54
+
55
+
For advanced use cases, you can use platform-specific icon names directly.
56
+
57
+
### iOS SF Symbols
58
+
59
+
On iOS, include a `.` in the icon name to use an SF Symbol path directly:
0 commit comments