/sploot

CSS linear-gradient function for creating split backgrounds

Primary LanguageJavaScript

sploot

CSS linear-gradient function for creating split backgrounds

Build Status

sploot!

npm i sploot
import sploot from 'sploot'

const style = {
  backgroundImage: sploot()
}
// 'linear-gradient(180deg, cyan 50%, white 50%)'
// with options
const style = {
  backgroundImage: sploot({
    start: 'tomato',
    end: 'fuchsia',
    position: '25%',
    angle: 90
  })
}

MIT License