dpx-react-context-menu
v1.0.2
Published
A professional React context menu with issue reporting, network logging, and error tracking
Maintainers
Readme
React Context Menu Pro
A professional React context menu with issue reporting, network logging, and error tracking. Perfect for dashboards and admin panels.
Features
- Custom right-click context menu with smooth animations
- Built-in issue reporting with screenshot capture
- Network request logging and error tracking
- Automatic error detection with smart suggestions
- Fully customizable theming with CSS variables
- TypeScript support
- RTL support
- Responsive design
Installation
npm install react-context-menu-proQuick Start
import { ContextMenuProvider, ContextMenuWrapper } from 'react-context-menu-pro';
import 'react-context-menu-pro/dist/styles.css';
function App() {
return (
<ContextMenuProvider
config={{
primaryColor: '#3b82f6',
apiKey: 'your-tracking-api-key',
onLogout: () => handleLogout(),
}}
>
<ContextMenuWrapper>
<YourApp />
</ContextMenuWrapper>
</ContextMenuProvider>
);
}Configuration
| Option | Type | Description |
|--------|------|-------------|
| primaryColor | string | Primary theme color |
| primaryColorDark | string | Darker shade for hover states |
| apiKey | string | API key for issue tracking |
| apiUrl | string | Custom API URL for issue tracking |
| onLogout | () => void | Logout function |
| onRefresh | () => void | Custom refresh function |
| isLoggedIn | () => boolean | Check if user is authenticated |
| currentPath | string | Current route path |
| hideLogoutOnPaths | string[] | Routes to hide logout button |
| enabled | boolean | Enable/disable context menu |
| translations | object | Custom translations |
| routeHistory | string[] | Route history for reports |
License
MIT
