What this family solves
Compact action-list component with a menu shell, button-backed items, icon slots, dividers, disabled state, and destructive action styling.
Marwes documentation
Compact action-list component with a menu shell, button-backed items, icon slots, dividers, disabled state, and destructive action styling.
Compact action-list component with a menu shell, button-backed items, icon slots, dividers, disabled state, and destructive action styling.
Use ContextMenu for a list of contextual actions; position and visibility are the consumer's responsibility.
Inline action list the consumer composes for placement and visibility
Choose an adapter in the verified examples. The inventory below reflects each framework package exactly.
@marwes-ui/reactContextMenu
ContextMenuActionItem, ContextMenuDividerItem, ContextMenuEntry, ContextMenuProps
@marwes-ui/vueContextMenu
ContextMenuActionItem, ContextMenuDividerItem, ContextMenuEntry, ContextMenuProps
@marwes-ui/svelteContextMenu
ContextMenuActionItem, ContextMenuEntry, ContextMenuProps
These examples come from the same fixtures verified by the repository checks.
import { ContextMenu, IconName } from "@marwes-ui/react"
export function Example() {
return (
<ContextMenu
ariaLabel="File actions"
items={[
{ value: "edit", label: "Edit", icon: IconName.Edit },
{ value: "preview", label: "Preview", icon: IconName.Eye },
{ value: "download", label: "Download", icon: IconName.Download },
{ kind: "divider" },
{ value: "bookmark", label: "Bookmark", icon: IconName.Bookmark },
{ value: "report", label: "Report", icon: IconName.Flag },
{ kind: "divider" },
{ value: "delete", label: "Delete", icon: IconName.Trash, destructive: true },
]}
/>
)
}<script setup lang="ts">
import { ContextMenu, IconName } from "@marwes-ui/vue"
</script>
<template>
<ContextMenu
aria-label="File actions"
:items="[
{ value: 'edit', label: 'Edit', icon: IconName.Edit },
{ value: 'preview', label: 'Preview', icon: IconName.Eye },
{ value: 'download', label: 'Download', icon: IconName.Download },
{ kind: 'divider' },
{ value: 'bookmark', label: 'Bookmark', icon: IconName.Bookmark },
{ value: 'report', label: 'Report', icon: IconName.Flag },
{ kind: 'divider' },
{ value: 'delete', label: 'Delete', icon: IconName.Trash, destructive: true },
]"
/>
</template><script lang="ts">
import { ContextMenu, IconName } from "@marwes-ui/svelte"
</script>
<ContextMenu
ariaLabel="File actions"
items={[
{ value: "edit", label: "Edit", icon: IconName.Edit },
{ value: "preview", label: "Preview", icon: IconName.Eye },
{ value: "download", label: "Download", icon: IconName.Download },
{ kind: "divider" },
{ value: "bookmark", label: "Bookmark", icon: IconName.Bookmark },
{ value: "report", label: "Report", icon: IconName.Flag },
{ kind: "divider" },
{ value: "delete", label: "Delete", icon: IconName.Trash, destructive: true },
]}
/>Context Menu uses Marwes preset CSS and theme variables. Customize it through the theme passed to MarwesProvider; do not add a second component stylesheet. See the theming guide for configuration and token details.