sns
sns

Reputation: 321

How to import more-vert icon in material-ui for react?

I tried a lot but i am not able to find a way to do it. Where is its exact location in material-ui? I saw some people using it. Any help is appreciated.

My best guess was :

import MoreVertIcon from '@material-ui/icons/more-vert';

Upvotes: 3

Views: 6225

Answers (3)

vsync
vsync

Reputation: 130471

Mui v5 import:

import MoreVertIcon from '@mui/icons-material/MoreVert';

https://mui.com/components/material-icons/?query=MoreVert&selected=MoreVert

Upvotes: 2

hemant rao
hemant rao

Reputation: 3215

Before use material ui icon You may need to import for that. Steps:-

  1. Open CMD
  2. Copy this command:- " npm install -S @material-ui/icons "
  3. Import icon that you want " import MoreVertIcon from '@material-ui/icons/more-vert'; "

Thanks

Upvotes: 0

Tholle
Tholle

Reputation: 112887

Make sure you install the icon library with npm install -S @material-ui/icons and then import it like this:

import MoreVertIcon from '@material-ui/icons/MoreVert';

If you wonder what the name of a particular icon is, you can see them listed here.

Upvotes: 7

Related Questions