basecoat-css 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,42 +8,51 @@ Your project must have [Tailwind CSS](https://tailwindcss.com/docs/installation)
|
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Install with any package manager:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
#
|
|
15
|
-
|
|
14
|
+
npm install basecoat-css # or pnpm add / yarn add / bun add
|
|
15
|
+
```
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
yarn add basecoat-css
|
|
17
|
+
## Usage
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
pnpm add basecoat-css
|
|
19
|
+
Add it just after Tailwind in your stylesheet:
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
```css
|
|
22
|
+
@import "tailwindcss";
|
|
23
|
+
@import "basecoat-css";
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
That's it, you can use any Basecoat class (`btn`, `card`, `input`, etc) in your markup.
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
### (Optional) JavaScript files
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
Some interactive components (Dropdown Menu, Popover, Select, Sidebar, Tabs, Toast) need some JavaScript.
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
With a build tool (ESM):
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
import 'basecoat-css/all';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or cherry-pick the components you need:
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
```js
|
|
41
|
+
import 'basecoat-css/tabs';
|
|
42
|
+
import 'basecoat-css/popover';
|
|
43
|
+
```
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
Without a build tool, copy the files from `node_modules`:
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
```bash
|
|
48
|
+
npx copyfiles -u 1 "node_modules/basecoat-css/dist/js/**/*" public/js/basecoat
|
|
44
49
|
```
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
Then reference what you need, e.g.
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<script src="/js/basecoat/tabs.min.js" defer></script>
|
|
55
|
+
```
|
|
47
56
|
|
|
48
57
|
## Documentation
|
|
49
58
|
|