MenuBox
BetaContainerized menu surface for grouped action items.
Installation
npm install @xaui/native
Import
import { MenuBox, MenuBoxItem } from '@xaui/native/menubox'
Basic Usage
Minimal example showing the component with its default configuration.
import { MenuBox } from '@xaui/native/menubox'export function Example() {return <MenuBox />}
Basic Settings MenuBox
Group navigation-like actions in a compact settings card.
import { MenuBox, MenuBoxItem } from '@xaui/native/menubox'import { Typography } from '@xaui/native/typography'export function BasicMenuBoxExample() {return (<MenuBox><MenuBoxItem itemKey="account" title="Account" endContent={<Typography>›</Typography>} /><MenuBoxItem itemKey="notifications" title="Notifications" endContent={<Typography>›</Typography>} /><MenuBoxItem itemKey="privacy" title="Privacy" endContent={<Typography>›</Typography>} /></MenuBox>)}
Descriptions and Disabled Item
Show secondary text and disable unavailable rows.
import { MenuBox, MenuBoxItem } from '@xaui/native/menubox'import { Typography } from '@xaui/native/typography'export function DescriptiveMenuBoxExample() {return (<MenuBox spacing={6}><MenuBoxItemitemKey="wifi"title="Wi-Fi"description="Connected to Office-5G"endContent={<Typography>On</Typography>}/><MenuBoxItemitemKey="bluetooth"title="Bluetooth"description="No device connected"/><MenuBoxItemitemKey="cellular"title="Cellular"description="Unavailable on this device"isDisabled/></MenuBox>)}
Custom Appearance
Control spacing, radius, and per-item text styling.
import { MenuBox, MenuBoxItem } from '@xaui/native/menubox'import { Typography } from '@xaui/native/typography'export function CustomAppearanceMenuBoxExample() {return (<MenuBoxradius="md"spacing={8}themeColor="secondary"backgroundColor="#f8fafc"style={{ padding: 6 }}><MenuBoxItemitemKey="theme"title="Theme"description="System default"endContent={<Typography>Auto</Typography>}customAppearance={{ title: { fontWeight: '700' } }}/><MenuBoxItemitemKey="language"title="Language"description="English"endContent={<Typography>›</Typography>}/></MenuBox>)}