UNPKG

@progress/kendo-react-layout

Version:

React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package

53 lines (52 loc) 1.76 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { DrawerProps } from './interfaces/DrawerProps'; import * as React from 'react'; /** * The Drawer ref. */ export interface DrawerHandle { /** * The Drawer element. */ element: HTMLDivElement | null; /** * Focuses the Drawer component. */ focus: () => void; } /** * Represents the [KendoReact Drawer component](https://www.telerik.com/kendo-react-ui/components/layout/drawer). * * @example * ```jsx * 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' } * ]; * * const [expanded, setExpanded] = React.useState(true); * const handleClick = () => setExpanded(prevState => !prevState); * * return ( * <Drawer expanded={expanded} position='start' mode='push' items={items}> * <DrawerContent> * <Button onClick={handleClick}>Toggle the drawer state</Button> * </DrawerContent> * </Drawer> * ); * }; * ``` */ export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<DrawerHandle | null>>;