Skip to content

Commit b68a0b1

Browse files
Update package to inform of new name
1 parent 8fbae82 commit b68a0b1

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

README.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
<h1 align="center">JS for Tailwind CSS</h1>
1+
> [!IMPORTANT]
2+
> `tailwindcss-js` has been renamed to `tailwindcss-js-context` to better reflect its purpose.
3+
4+
<h1 align="center">JS Context for Tailwind CSS</h1>
25

36
<div align="center">
47

5-
[![minified size](https://img.shields.io/bundlephobia/min/tailwindcss-js)](https://bundlephobia.com/package/tailwindcss-js)
6-
[![license](https://img.shields.io/github/license/brandonmcconnell/tailwindcss-js?label=license)](https://github.com/brandonmcconnell/tailwindcss-js/blob/main/LICENSE)
7-
[![version](https://img.shields.io/npm/v/tailwindcss-js)](https://www.npmjs.com/package/tailwindcss-js)
8+
[![minified size](https://img.shields.io/bundlephobia/min/tailwindcss-js-context)](https://bundlephobia.com/package/tailwindcss-js-context)
9+
[![license](https://img.shields.io/github/license/brandonmcconnell/tailwindcss-js-context?label=license)](https://github.com/brandonmcconnell/tailwindcss-js-context/blob/main/LICENSE)
10+
[![version](https://img.shields.io/npm/v/tailwindcss-js-context)](https://www.npmjs.com/package/tailwindcss-js-context)
811
[![twitter](https://img.shields.io/twitter/follow/branmcconnell)](https://twitter.com/branmcconnell)
912

1013
</div>
1114

12-
`tailwindcss-js` is a plugin for Tailwind CSS that introduces the `js` directive, a utility that allows you to evaluate JavaScript expressions within your utility classes. This provides a flexible, dynamic approach to defining your styles.
15+
`tailwindcss-js-context` is a plugin for Tailwind CSS that introduces the `js` directive, a utility that allows you to evaluate JavaScript expressions within your utility classes. This provides a flexible, dynamic approach to defining your styles.
1316

1417
- [Installation](#installation)
1518
- [Usage](#usage)
1619
- [Basic Usage](#basic-usage)
1720
- [Using Context Values](#using-context-values)
1821
- [Built-In Context Values](#built-in-context-values)
1922
- [Other (mostly random \& unrealistic) examples](#other-mostly-random--unrealistic-examples)
20-
- [Why use `tailwindcss-js`](#why-use-tailwindcss-js)
23+
- [Why use `tailwindcss-js-context`](#why-use-tailwindcss-js-context)
2124
- [New syntax explanation](#new-syntax-explanation)
2225

23-
> [!IMPORTANT]
24-
> Update to `@latest` to ensure compatibility with newer versions of Tailwind CSS.
25-
>
26+
> [!WARNING]
2627
> **Syntax change:** The value between the brackets in the `js` directive must now be quoted, due to a breaking change introduced in Tailwind CSS v3.3.6.
2728
> ```
2829
> ❌ js-[content-['1_+_1_=_#{1+1}']]
@@ -36,15 +37,15 @@
3637
You can install the plugin via npm:
3738
3839
```bash
39-
npm install tailwindcss-js
40+
npm install tailwindcss-js-context
4041
```
4142
4243
Then, include it in your `tailwind.config.js`:
4344

4445
```js
4546
module.exports = {
4647
plugins: [
47-
require('tailwindcss-js'),
48+
require('tailwindcss-js-context'),
4849
]
4950
}
5051
```
@@ -54,7 +55,7 @@ or if using a custom context object:
5455
```js
5556
module.exports = {
5657
plugins: [
57-
require('tailwindcss-js')({
58+
require('tailwindcss-js-context')({
5859
// ...any values, e.g.
5960
appName: 'My app',
6061
}),
@@ -118,9 +119,9 @@ Please note that all utilities are built at runtime, so in order for a one-off u
118119
```
119120
<sup>[View this example on Tailwind Play](https://play.tailwindcss.com/l4VSXZP2gd)</sup>
120121

121-
## Why use `tailwindcss-js`
122+
## Why use `tailwindcss-js-context`
122123

123-
`tailwindcss-js` allows you to bring the power of JavaScript directly into your utility classes, enabling dynamic styles based on logic and state. This opens up endless possibilities for reactive design patterns.
124+
`tailwindcss-js-context` allows you to bring the power of JavaScript directly into your utility classes, enabling dynamic styles based on logic and state. This opens up endless possibilities for reactive design patterns.
124125

125126
This plugin is…
126127

@@ -151,7 +152,7 @@ Passing the joined strings together as a string allows the Tailwind CSS parser (
151152

152153
---
153154

154-
I hope you find `tailwindcss-js` a valuable addition to your projects. If you have any issues or suggestions, don't hesitate to open an issue or pull request.
155+
I hope you find `tailwindcss-js-context` a valuable addition to your projects. If you have any issues or suggestions, don't hesitate to open an issue or pull request.
155156

156157
If you liked this, you might also like my other Tailwind CSS plugins:
157158
* [tailwindcss-multi](https://github.com/brandonmcconnell/tailwindcss-multi): Group utilities together by variant

dist/index.cjs.map

+1-1
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)