tw-elevation
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

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,
		},
	}
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.04latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.04
0.2.21
0.2.10
0.2.00
0.1.11
0.1.01
0.1.1-00
0.1.0-experimental0
0.0.60
0.0.50
0.0.40
0.0.31
0.0.20
0.0.10

Package Sidebar

Install

npm i tw-elevation

Weekly Downloads

8

Version

0.3.0

License

MIT

Unpacked Size

24.3 kB

Total Files

15

Last publish

Collaborators

  • tranvansang