Home > @uniformdev/design-system > DrawerItem

DrawerItem interface

Signature:

Properties

<table><thead><tr><th>

Property

</th><th>

Modifiers

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

id

</td><td>

</td><td>

string

</td><td>

An ID for the drawer. It should be unique in the stack where it's rendered

</td></tr> <tr><td>

instanceKey?

</td><td>

</td><td>

string

</td><td>

(Optional) Just like React.Key, changing this value indicates that the drawer has changed and we need to close the current instance and open a new one

</td></tr> <tr><td>

onRequestClose?

</td><td>

</td><td>

() => void

</td><td>

(Optional) Called when the close button is clicked, the Escape button is pressed, or when the drawer's overlay is clicked

</td></tr> <tr><td>

stackId?

</td><td>

</td><td>

string

</td><td>

(Optional) The ID of the stack where the drawer should be renderer. It should match the stack ID of an existing DrawerRenderer. If not provided, it will fall back to the default renderer of the drawer. If the drawer is rendered inside another one, this value gets inherited.

</td></tr> <tr><td>

testId?

</td><td>

</td><td>

string

</td><td>

(Optional) Test ID for test automation *

</td></tr> <tr><td>

width?

</td><td>

</td><td>

DrawerRendererProps['width']

</td><td>

(Optional) The desired width of the drawer. This value is ignored if the drawer is part of a DrawerRenderer with withoutFluidWidth. If not set, the drawer will use the width of its renderer.

</td></tr> </tbody></table>