@neynar/ui
Version:
React UI component library built on shadcn/ui and Tailwind CSS
38 lines (28 loc) • 893 B
Markdown
# MenubarPortal
**Type**: component
Portal for rendering menu content outside the DOM hierarchy. Automatically used by MenubarContent to ensure proper layering and positioning of dropdown menus. Prevents z-index conflicts.
## JSX Usage
```jsx
import { MenubarPortal } from '@neynar/ui';
<MenubarPortal
forceMount={value}
container={value}
/>
```
## Component Props
### forceMount
- **Type**: `true`
- **Required**: No
- **Description**: Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries
### container
- **Type**: `HTMLElement`
- **Required**: No
- **Description**: Specify a container element to portal the content into
## Examples
```tsx
// Usually used automatically by MenubarContent
<MenubarPortal container={customContainer}>
<MenubarPrimitive.Content>...</MenubarPrimitive.Content>
</MenubarPortal>
```
/