Docs
Close

Close

The button that closes the dialog.

import { Drawer } from '@vladyoslav/drawer'
// or import { DrawerClose } from '@vladyoslav/drawer'
 
export const MyComponent = () => (
  <Drawer.Root>
    <Drawer.Trigger />
    <Drawer.Portal>
      <Drawer.Content>
        <Drawer.Close>X</Drawer.Close>
        ...
      </Drawer.Content>
    </Drawer.Portal>
  </Drawer.Root>
)

API

The Close component has been completely re-exported from @radix-ui/react-dialog (opens in a new tab)

Read Radix UI Docs (opens in a new tab)