0.3.0 • Published 1 year ago

tw-elevation v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

TailwindCSS elevation utilities plugin

  • Support Just-In-Time (JIT) mode
  • Install: yarn add -D tw-elevation
  • Config: In tailwind.config.js,
export default {
	plugins: [
		require('tw-elevation')
	],
}
  • Class names: .elevation-0, .elevation-1, up to .elevation-24.
  • JIT class names: .elevation-[0], .elevation-[1], ... Arbitrary values are supported.
  • To change baseline color, use class: .elevation-[#888].
  • All themed colors are support: .elevation-red-500.
  • For color with opacity, for example: .elevation-red-500/50, the opacity will be scaled by half and clipped accordingly.
  • Screenshot:

tw-elevation screenshot

Config color and opacity

In tailwind.config.js,

export default {
	plugins: [
		require('tw-elevation')
	],
	twElevation: {
		baselineColor: '#000',
		opacity: {
			umbra: .2,
			penumbra: .14,
			ambient: .12,
		},
	}
}
0.3.0

1 year ago

0.2.1

1 year ago

0.2.2

1 year ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

4 years ago

0.1.1-0

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago