1.0.1 • Published 2 years ago
menucolorswitcher v1.0.1
menuColorSwitcher
A small piece of code for help with adjusting menu text color
The purpose of this package, is for beginners who don't neccesarly know how to tackle the issue of a menubar that switches text color based on the brightness of the section behind it, and need a vanilla JS solution that doesn't require a framework. This package has zero dependencies.
A preview example of the code working can be seen here (not yet implemented)
To use the package simple import the code
import { colorSwitchMenu } from 'colorSwitchMenu'
and use the function as such
colorSwitchMenu({
menuItems: '.csm-menu-item',
sections: '.csm-section',
})
If no values are passed in menuItems and sections they will default to the examples in the snippet above.