react-lava-lamp-menu
A menu component with a lava lamp effect when selecting a menu option.
Demo
https://jbccollins.github.io/react-lava-lamp-menu/
Install
npm install --save react-lava-lamp-menu
Usage
import React Component from 'react' import LavaLampMenu from 'react-lava-lamp-menu' state = selectedItemId: "item1" { this; } { return <LavaLampMenu = = = =} = = =/> }
prop | description |
---|---|
items | List of menu items |
itemStyle | Inline style for all items |
mouseOverItemStyle | Inline style for the item that is currently being moused over. Will override any conflicting styles from itemStyle |
selectedItemStyle | Inline style for the item that is currently selected. Will override any conflicting styles from itemStyle and mouseOverItemStyle |
onSelectedItemChange | Receives the selected item id on click |
selectedItemId | The id of the item that is currently selected |
Development
From the top level directory run
yarn start
In a separate terminal window, from the example
directory run
yarn start
License
MIT © jbccollins