React

Menu Sheet (Deprecated)

A sheet-like component that provides options related to user actions.

This component is deprecated. Use Swipeable Menu Sheet instead.

Installation

npx @seed-design/cli@latest add ui:menu-sheet

Props

Prop

Type

childrenReact.ReactNode
open?boolean | undefined
defaultOpen?boolean | undefined
onOpenChange?((open: boolean, details?: DialogChangeDetails) => void) | undefined

Prop

Type

Prop

Type

title?React.ReactNode
description?React.ReactNode
layerIndex?number | undefined

Prop

Type

Prop

Type

prefixIcon?React.ReactNode
labelReact.ReactNode
description?React.ReactNode

Examples

Trigger

<MenuSheetTrigger> sets the aria-haspopup="dialog" attribute and automatically sets the aria-expanded attribute based on MenuSheet's open state. These attributes are useful for assistive technologies like screen readers.

With Title

Use the title prop of MenuSheetContent to display a title in the sheet header.

With Title and Description

Use the description prop of MenuSheetContent to add a description below the title.

Label Align

Set the label alignment of menu items using the labelAlign prop of MenuSheetContent.

labelAlign="left" (with PrefixIcon)

Aligns the label to the left.

labelAlign="center" (without PrefixIcon)

Aligns the label to the center (typically, when prefixIcon is not present).

Overriding labelAlign

If needed, you can override the labelAlign specified on MenuSheetContent with the labelAlign specified on MenuSheetGroup or MenuSheetItem.

onOpenChange Details

The details object is provided as the second argument to onOpenChange.

reason

When opening (open: true)

  • "trigger": Opened by MenuSheetTrigger (MenuSheet.Trigger)

When closing (open: false)

  • "closeButton": Closed by MenuSheet.CloseButton
  • "escapeKeyDown": ESC key pressed
  • "interactOutside": Clicked outside the sheet

Skip Animation

Use the skipAnimation prop to skip the enter/exit animation of MenuSheet.

Table of contents