drivn 1.0.1
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/LICENSE.md +21 -0
- package/README.md +97 -0
- package/dist/index.js +1667 -0
- package/package.json +53 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Drivn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://drivnui.com">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/tomaskdv/drivn/main/.github/assets/logo.svg" width="60" height="60" alt="Drivn" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
<h1 align="center">Drivn</h1>
|
|
7
|
+
<h3 align="center">Write less. Build more.</h3>
|
|
8
|
+
<p align="center">
|
|
9
|
+
Components with dot notation, smart dependencies, and zero verbosity. Ship faster with cleaner code.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<br/>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://www.npmjs.com/package/drivn"><img src="https://img.shields.io/npm/v/drivn?style=flat-square&color=171717&labelColor=171717" alt="npm version" /></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/drivn"><img src="https://img.shields.io/npm/dm/drivn?style=flat-square&color=171717&labelColor=171717" alt="downloads" /></a>
|
|
17
|
+
<a href="https://github.com/tomaskdv/drivn/blob/main/LICENSE.md"><img src="https://img.shields.io/npm/l/drivn?style=flat-square&color=171717&labelColor=171717" alt="license" /></a>
|
|
18
|
+
<a href="https://github.com/tomaskdv/drivn"><img src="https://img.shields.io/github/stars/tomaskdv/drivn?style=flat-square&color=171717&labelColor=171717" alt="stars" /></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<br/>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="https://drivnui.com">
|
|
25
|
+
<img src="https://raw.githubusercontent.com/tomaskdv/drivn/main/.github/assets/drivn.png" alt="Drivn — Write less. Build more." width="100%" />
|
|
26
|
+
</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
Get up and running in two commands:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npx drivn@latest create
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> Detects your framework, sets up utilities, installs dependencies, and adds color tokens.
|
|
38
|
+
|
|
39
|
+
Then add any component:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx drivn add button
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
> Components are copied into your codebase. No node_modules magic — they're yours.
|
|
46
|
+
|
|
47
|
+
Or browse all components interactively:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npx drivn add
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
> Opens a multi-select prompt — pick exactly the components you need.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Why Drivn
|
|
58
|
+
|
|
59
|
+
Most component libraries ask you to learn their abstractions, install their runtime, and work around their opinions. Drivn takes the opposite approach — every component is plain React and Tailwind, copied straight into your project. No wrappers. No lock-in. Nothing between you and the code.
|
|
60
|
+
|
|
61
|
+
| | What you get |
|
|
62
|
+
|---|---|
|
|
63
|
+
| **Zero Dependencies** | Pure React + Tailwind. No Radix, no cva, no runtime overhead. |
|
|
64
|
+
| **Dot Notation API** | `Dialog.Content`, not `DialogContent`. One import, clean API, fully typed. |
|
|
65
|
+
| **`const styles`** | All classes in a styles object. Opens clean, reads clean, diffs clean. |
|
|
66
|
+
| **Type-Safe Variants** | `keyof typeof styles.variants` gives autocomplete. No magic strings. |
|
|
67
|
+
| **Copy & Own** | Every component lives in your codebase. Full control after install. |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## How it looks
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { Dialog } from '@/components/ui/dialog'
|
|
75
|
+
import { Button } from '@/components/ui/button'
|
|
76
|
+
|
|
77
|
+
export function ConfirmDialog() {
|
|
78
|
+
return (
|
|
79
|
+
<Dialog>
|
|
80
|
+
<Dialog.Trigger>
|
|
81
|
+
<Button>Open Dialog</Button>
|
|
82
|
+
</Dialog.Trigger>
|
|
83
|
+
<Dialog.Content title="Confirm action">
|
|
84
|
+
Are you sure you want to continue?
|
|
85
|
+
<Dialog.Footer>
|
|
86
|
+
<Button variant="outline">Cancel</Button>
|
|
87
|
+
<Button>Confirm</Button>
|
|
88
|
+
</Dialog.Footer>
|
|
89
|
+
</Dialog.Content>
|
|
90
|
+
</Dialog>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
Licensed under the [MIT License](./LICENSE.md).
|