2025-05-15 22:00:30 -07:00
# basecoat-css
This package provides the core CSS styles for [Basecoat ](https://basecoatui.com ), a component library built with Tailwind CSS.
## Prerequisites
Your project must have [Tailwind CSS ](https://tailwindcss.com/docs/installation ) installed and configured, as Basecoat relies on Tailwind utility classes and theming.
## Installation
2025-06-16 21:28:32 +08:00
Install with any package manager:
2025-05-15 22:00:30 -07:00
```bash
2025-06-16 21:28:32 +08:00
npm install basecoat-css # or pnpm add / yarn add / bun add
2025-05-15 22:00:30 -07:00
```
## Usage
2025-06-16 21:28:32 +08:00
Add it just after Tailwind in your stylesheet:
2025-05-15 22:00:30 -07:00
```css
2025-06-16 21:28:32 +08:00
@ import "tailwindcss" ;
@ import "basecoat-css" ;
2025-05-15 22:00:30 -07:00
```
2025-06-16 21:28:32 +08:00
That's it, you can use any Basecoat class (`btn` , `card` , `input` , etc) in your markup.
2026-06-03 18:59:21 +08:00
To use a specific style, import its standalone bundle instead:
```css
@ import "tailwindcss" ;
@ import "basecoat-css/sera" ;
```
2025-06-16 21:28:32 +08:00
### (Optional) JavaScript files
Some interactive components (Dropdown Menu, Popover, Select, Sidebar, Tabs, Toast) need some JavaScript.
With a build tool (ESM):
```js
import 'basecoat-css/all' ;
```
Or cherry-pick the components you need:
```js
import 'basecoat-css/tabs' ;
import 'basecoat-css/popover' ;
```
Without a build tool, copy the files from `node_modules` :
```bash
npx copyfiles -u 1 "node_modules/basecoat-css/dist/js/**/*" public/js/basecoat
```
Then reference what you need, e.g.
```html
< script src = "/js/basecoat/tabs.min.js" defer ></ script >
```
2025-05-15 22:00:30 -07:00
## Documentation
For more detailed information on components, their usage, and customization options, please refer to the [Basecoat documentation ](https://basecoatui.com/installation/#install-css ).
## License
2026-06-03 18:59:21 +08:00
[MIT ](https://github.com/hunvreus/basecoat/blob/main/LICENSE.md )