Components
    • Animation
    • Buttons
    • Charts
    • Common Utilities
    • Conversational UI
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdowns
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gantt
    • Gauges
    • Grid
    • Indicators
    • Inputs
    • Labels
    • Layout
    • ListView
    • Notification
    • PDF Processing
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • Sortable
    • Tooltip
    • TreeList
    • TreeView
    • Upload
    Sample Applications
    Styling & Themes
    Common Features
    Project Setup
    Changelog

Drawer

Represents the KendoReact Drawer component.

const App = () => {
  const items = [
      { text: 'Inbox', icon: 'k-i-inbox', selected: true },
      { separator: true },
      { text: 'Notifications', icon: 'k-i-bell', disabled: true },
      { text: 'Calendar', icon: 'k-i-calendar' },
      { separator: true },
      { text: 'Attachments', icon: 'k-i-hyperlink-email' },
      { text: 'Favourites', icon: 'k-i-star-outline' }
  ];

  const [expanded, setExpanded] = React.useState(true);
  const handleClick = () => setExpanded(prevState => !prevState);

  return (
      <Drawer expanded={expanded} position='start' mode='push' items={items}>
          <DrawerContent>
              <button className="k-button" onClick={handleClick}>Toggle the drawer state</button>
          </DrawerContent>
      </Drawer>
  );
};
   ReactDOM.render(<App />, document.querySelector('my-app'));

In this article

Not finding the help you need?