@sensilla-cloud/react-context-menu
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

react-context-menu

A react component for custom context menus. Designed to be dropped in and used.

There is no included styles, however, the stories directory contains the scss used for the stories and can be used as a good starting point.

The menu handles placement even when close to the edge of the screen and sub-menus can be nested.

Quick Start

import ContextMenu from '@sensilla-cloud/react-context-menu';

<ContextMenu items={[
        <span>Item 1</span>,
        <span>Item 2</span>
    ]}
    className="context-menu">
    <div
        style={{
            width: 300,
            height: 300,
            backgroundColor: '#222',
            color: '#fff',
            textAlign: 'center',
            lineHeight: '300px',
            marginLeft: 'auto',
            marginRight: 'auto'
        }}
    >
        Right-click Me!
    </div>
</ContextMenu>

Check out the storybook to see everything that is possible.

License

This library is licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i @sensilla-cloud/react-context-menu

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

17.9 kB

Total Files

25

Last publish

Collaborators

  • huner2