Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is LeftNav in material-ui?

Tags:

material-ui

I keep seeing references to a component called "LeftNav" in the material-ui react library (example: Material UI - Open LeftNav / Drawer on AppBar click), but I can't find anything about it in the documentation. What is it? How does it differ from Drawer? Why is it apparently undocumented, despite being hugely popular (at least judging by the number of questions I see about how to use it)? What is its toggle() method for, and is there a similar method for Drawer (the documentation suggests not, but for all I would know by reading the documentation there was no such component as LeftNav at all, so I don't think the documentation can really be trusted here)?

like image 937
Periata Breatta Avatar asked Dec 24 '22 01:12

Periata Breatta


1 Answers

<LeftNav/> is the same as <Drawer/>. The name was changed from "LeftNav" to "Drawer" with the release of material-UI version 0.15. Take a look at the change log here and you will see this.

like image 74
CaseyC Avatar answered Dec 31 '22 03:12

CaseyC