Components
ContextMenu
A fully accessible and customizable context menu with options, checkboxes, and radio groups.
Introduction
The ContextMenu
component provides a fully-featured, accessible context menu with support for dynamic options, checkboxes, and radio groups.
Default Use Case: Context Menu with Options
Right-click anywhere on this card
Installation
Install the ContextMenu
component using the following command:
File Structure
Prop Types
Prop | Type | Default |
---|---|---|
children | React.ReactNode | - |
onClick | (event: MouseEvent) => void | - |
className | string | - |
checked | boolean | - |
Features
- Dynamic Menu Options:
- Create context menus with dynamic options, checkboxes, and radio groups.
- Keyboard Navigation:
- Full keyboard navigation support.
- Built-In Accessibility:
- Fully compliant with ARIA roles and attributes.
Conclusion
The ContextMenu
component provides a flexible and accessible way to create context menus with advanced functionality, including multi-select options, radio groups, and customizable triggers.