English | 中文
npm install react-3d-menu
You can custom the menu item, see more demos .
import { React3DMenu } from 'react-3d-menu';
const menuItems: React.ReactNode[] = [
'item1 string',
'item2 string',
<SomeComponent />,
<SomeComponent2 />
// ...
];
export const MyComponent: React.FC = () => {
return (
<React3DMenu items={menuItems} className="my-menu">
<div className="my-menu-head">React 3D Menu</div>
</React3DMenu>
);
};
name | type | description |
---|---|---|
items | React.ReactNode[] |
Menu items to render |
children | React.ReactNode |
Element to activate 3d menu when hover |
MIT