File tree Expand file tree Collapse file tree 1 file changed +53
-1
lines changed
Expand file tree Collapse file tree 1 file changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,59 @@ A TailwindCSS plugin for the utopia fluid design system
44
55## Install
66
7- TODO
7+ ``` bash
8+ To install the utopia taiwindcss plugin:
9+
10+ pnpm add -D tailwindcss-utopia
11+ ```
12+
13+ For the tailwind-merge utopia support:
14+
15+ Then in your ` tailwindcss.config.(js/ts) ` :
16+
17+ ``` typescript
18+ import { Config } from " tailwindcss" ;
19+ import tailwindcssUtopia , { extract } from " tailwindcss-utopia" ;
20+
21+ const config = {
22+ content: {
23+ files: [
24+ /* your files to be parsed */
25+ ],
26+ extract ,
27+ },
28+ theme: {
29+ extend: {
30+ utopia: {
31+ /* your custom utopia overrides */
32+ },
33+ },
34+ },
35+ plugins: [tailwindcssUtopia ],
36+ } satisfies Config ;
37+
38+ export default config ;
39+ ```
40+
41+ Then to add support for tailwind-merge, first install the package:
42+
43+ ``` bash
44+ pnpm add -D tailwind-merge-utopia
45+ ```
46+
47+ Then use it in your ` utils.(js/ts) ` :
48+
49+ ``` typescript
50+ import { extendTailwindMerge } from " tailwind-merge" ;
51+ import { withUtopia } from " utopia-tailwind-merge" ;
52+ import { clsx , type ClassValue } from " clsx" ;
53+
54+ const twMerge = extendTailwindMerge (withUtopia );
55+
56+ export function cn(... inputs : ClassValue []) {
57+ return twMerge (clsx (inputs ));
58+ }
59+ ```
860
961## Features
1062
You can’t perform that action at this time.
0 commit comments