How to add an Icon in the Navigation Menu list item? #854
Replies: 1 comment
-
I was able to do this by -
Using the above in below code -
Now, svgcolor will be used for custom SVG icon, and ignored by the rest of the Icons. Please feel free to share any better ways! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I am new to both tailwindCSS & shadcn/ui.
Currently i have setup a new Next13 project with shadcn/ui. I am trying to add the https://ui.shadcn.com/docs/components/navigation-menu into my app.
I am able to get the navigation menu working, but i want to add an icon to the title of the menu list. I am not sure how to edit the component i have created in the app (not the components/ui/navigation-menu) to add the Icon.
Below is my sample snippet-
Here how do i make the NavListItem accept the icon as a prop?
i think i am facing more of a Typescript issue here than shadcn/ui.
In general is there a good readup on how to use RadixUI? the docs don't look very helpful.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions