<!-- API Report Version: 2.3 -->

## API Report File for "@atlaskit/drawer"

> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)

### Table of contents

- [Main Entry Types](#main-entry-types)
- [Peer Dependencies](#peer-dependencies)

### Main Entry Types

<!--SECTION START: Main Entry Types-->

```ts
import { ComponentType } from 'react';
import { CSSObject } from '@emotion/react';
import { default as React_2 } from 'react';
import { ReactElement } from 'react';
import { ReactNode } from 'react';
import { SyntheticEvent } from 'react';
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
import { WithContextProps } from '@atlaskit/analytics-next';

// @public (undocumented)
export interface BaseProps {
	children?: ReactNode;
	icon?: ComponentType<any>;
	onCloseComplete?: (node: HTMLElement | null) => void;
	onOpenComplete?: (node: HTMLElement | null) => void;
	overrides?: OverridesType;
	// @deprecated (undocumented)
	shouldUnmountOnExit?: boolean;
	testId?: string;
	width?: DrawerWidth;
}

// @public
export type CloseTrigger = 'backButton' | 'blanket' | 'escKey';

// @public (undocumented)
export type ContentCSSProps = Omit<ContentProps, 'cssFn'>;

// @public (undocumented)
export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
	// @deprecated (undocumented)
	cssFn: (defaultStyles: CSSObject) => CSSObject;
}

// @public (undocumented)
const _default: React_2.ForwardRefExoticComponent<
	Pick<
		Pick<
			Omit<DrawerProps, keyof WithAnalyticsEventsProps>,
			| 'children'
			| 'icon'
			| 'isOpen'
			| 'onClose'
			| 'onCloseComplete'
			| 'onKeyDown'
			| 'onOpenComplete'
			| 'overrides'
			| 'shouldUnmountOnExit'
			| 'testId'
			| 'zIndex'
			| keyof DrawerLabel
		> &
			Partial<
				Pick<Omit<DrawerProps, keyof WithAnalyticsEventsProps>, 'width' | keyof FocusLockSettings>
			> &
			Partial<
				Pick<
					{
						autoFocusFirstElem?: (() => HTMLElement | null) | boolean | undefined;
						isFocusLockEnabled?: boolean | undefined;
						shouldReturnFocus?: boolean | undefined;
						width: DrawerWidth;
					},
					never
				>
			> &
			React_2.RefAttributes<any> &
			WithContextProps,
		| 'analyticsContext'
		| 'children'
		| 'icon'
		| 'isOpen'
		| 'key'
		| 'onClose'
		| 'onCloseComplete'
		| 'onKeyDown'
		| 'onOpenComplete'
		| 'overrides'
		| 'shouldUnmountOnExit'
		| 'testId'
		| 'width'
		| 'zIndex'
		| keyof DrawerLabel
		| keyof FocusLockSettings
	> &
		React_2.RefAttributes<any>
>;
export default _default;

// @public (undocumented)
export type DefaultsType = {
	Sidebar: {
		component: React.ComponentType<SidebarProps>;
		cssFn: (defaultStyles: CSSObject) => CSSObject;
	};
	Content: {
		component: React.ComponentType<ContentProps>;
		cssFn: (defaultStyles: CSSObject) => CSSObject;
	};
};

// @public (undocumented)
interface DrawerLabel {
	label?: string;
	titleId?: string;
}

// @public (undocumented)
export type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Content' | 'Sidebar'>;

// @public (undocumented)
export type DrawerPrimitiveOverrides = Pick<OverridesType, 'Content' | 'Sidebar'>;

// @public (undocumented)
export interface DrawerPrimitiveProps extends BaseProps, FocusLockSettings, DrawerLabel {
	// (undocumented)
	in: boolean;
	// (undocumented)
	onClose: (event: SyntheticEvent<HTMLElement>) => void;
}

// @public (undocumented)
export type DrawerProps = BaseProps &
	FocusLockSettings &
	WithAnalyticsEventsProps &
	DrawerLabel & {
		onKeyDown?: (event: SyntheticEvent) => void;
		onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
		isOpen: boolean;
		zIndex?: number;
	};

// @public (undocumented)
export type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';

// @public (undocumented)
export interface FocusLockProps extends FocusLockSettings {
	children?: ReactElement;
}

// @public (undocumented)
interface FocusLockSettings {
	autoFocusFirstElem?: (() => HTMLElement | null) | boolean;
	isFocusLockEnabled?: boolean;
	shouldReturnFocus?: boolean;
}

// @public (undocumented)
export type OverridesType = {
	Sidebar?: {
		component?: React.ComponentType<SidebarProps>;
		cssFn?: (defaultStyles: CSSObject) => CSSObject;
	};
	Content?: {
		component?: React.ComponentType<ContentProps>;
		cssFn?: (defaultStyles: CSSObject) => CSSObject;
	};
};

// @public (undocumented)
export type SidebarCSSProps = Omit<SidebarProps, 'cssFn'>;

// @public (undocumented)
export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
	// @deprecated (undocumented)
	cssFn: (defaultStyles: CSSObject) => CSSObject;
}

// @public (undocumented)
export type Widths = {
	extended: {
		width: string;
	};
	full: {
		width: string;
	};
	medium: {
		width: number;
	};
	narrow: {
		width: number;
	};
	wide: {
		width: number;
	};
};

// (No @packageDocumentation comment for this package)
```

<!--SECTION END: Main Entry Types-->

### Peer Dependencies

<!--SECTION START: Peer Dependencies-->

```json
{
	"react": "^16.8.0"
}
```

<!--SECTION END: Peer Dependencies-->
