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
You can define icons from https://fonts.google.com/icons?icon.set=Material+Icons&icon.style=Outlined[Material Icons,window=_blank] and https://lucide.dev/icons/[Lucide Icons,window=_blank]. You can also apply an svg file using the customized `icon` macro.
115
+
You can define icons from https://fonts.google.com/icons?icon.set=Material+Icons&icon.style=Outlined[Material Icons,window=_blank] and https://lucide.dev/icons/[Lucide Icons,window=_blank] with the icon macro. You can also create custom icons with SVG files using the svg macro.
116
116
117
-
Method 1: Inline icon macro with an svg file::
118
-
The customized inline icon macro accepts a file path as it's target source. The file must be an svg file.
117
+
Method 1: icon macro::
118
+
The inline icon macro accepts a Lucide or Material icon name as the target source.
119
119
+
120
-
This methods supports using CSS variables within the svg.
120
+
This method supports light and dark mode automatically.
121
121
+
122
-
[source]
123
-
----
124
-
icon:ROOT:ui/icons/vector.svg[]
122
+
[source,title="Lucide"]
125
123
----
124
+
// the icon macro uses lucide by default
125
+
icon:boom-box[]
126
+
// or specifiy lucide
127
+
icon:lucide:boom-box[]
126
128
127
-
Method 2: Inline icon macro with a material-icons target::
128
-
The customized inline icon macro supports material icon names as it's target source prefixed with `material-icons:`. Ensure the name is lower case with underscores instead of spaces.
129
+
// alt or title attribute create an aria-label
130
+
icon:atom[title="Split the atom"]
131
+
icon:moon[alt="That's no moon"]
132
+
133
+
// customize with tailwind classes as the role
134
+
With tailwind roles icon:star[role="text-amber-600 text-2xl"]
This method supports light and dark mode automatically.
158
+
This methods supports using CSS variables within the svg.
133
159
+
134
160
[source]
135
161
----
136
-
icon:material-icons:thumb_up[]
162
+
svg:ROOT:ui/icons/vector.svg[role="icon"]
137
163
----
138
164
139
-
Method 3: material-icons role::
165
+
Method 3: block or inline span with material-icons role::
140
166
Use the custom role `material-icons` on block or inline content. The content must be a material icon name in lower case. If there are spaces in the name, use underscores instead.
141
167
+
142
168
This method supports light and dark mode automatically.
@@ -156,7 +182,7 @@ Inline material icons [.material-icons]#thumb_up#
0 commit comments