Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit 20f9c70

Browse files
committed
Update installation documentation for Tailwind CSS v4
1 parent 701a78a commit 20f9c70

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
This plugin allows you to target parent nodes with a child that has `:focus-visible`.
44

5-
## Usage
5+
## Installation
66

77
Install as dev-dependency using:
88

99
```sh
1010
npm i -D tailwindcss-focus-visible-within
1111
```
12+
13+
### Tailwind CSS v4
14+
15+
Add the plugin to your style sheet:
16+
17+
```css
18+
@plugin "tailwindcss-focus-visible-within";
19+
```
20+
21+
### Tailwind CSS v3
22+
1223
Add the plugin to your `tailwind.config.js`:
1324

1425
```js
@@ -17,12 +28,15 @@ module.exports = {
1728
//
1829
},
1930
plugins: [
20-
require('tailwindcss-focus-visible-within')
31+
require("tailwindcss-focus-visible-within")
2132
//
2233
],
2334
}
2435
```
25-
You can now apply Tailwind classes to a parent node that has an element child with the `focus-visible` state.
36+
37+
## Usage
38+
39+
You can apply Tailwind CSS classes to a parent node that has an element child with the `focus-visible` state.
2640

2741
```html
2842
<div class="focus-visible-within:…">

0 commit comments

Comments
 (0)