doodleui-react 0.1.0
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 +21 -0
- package/README.md +68 -0
- package/dist/index.cjs +1231 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +185 -0
- package/dist/index.d.ts +185 -0
- package/dist/index.js +1174 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 doodle-ui
|
|
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,68 @@
|
|
|
1
|
+
# doodle-ui
|
|
2
|
+
|
|
3
|
+
Hand-drawn React components with an Excalidraw-like sketch aesthetic. Chrome is drawn with [rough.js](https://roughjs.com). Text stays real HTML, so it remains crisp and accessible.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install doodleui-react
|
|
9
|
+
# or
|
|
10
|
+
pnpm add doodleui-react
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Peer dependencies: `react` and `react-dom` >= 18.
|
|
14
|
+
|
|
15
|
+
## Quickstart
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import {
|
|
19
|
+
SketchSeedProvider,
|
|
20
|
+
TooltipProvider,
|
|
21
|
+
Button,
|
|
22
|
+
Card,
|
|
23
|
+
useSketchSeed,
|
|
24
|
+
} from "doodleui-react";
|
|
25
|
+
|
|
26
|
+
function Shuffle() {
|
|
27
|
+
const { shuffle } = useSketchSeed();
|
|
28
|
+
return <Button onClick={shuffle}>Shuffle</Button>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function App() {
|
|
32
|
+
return (
|
|
33
|
+
<SketchSeedProvider>
|
|
34
|
+
<TooltipProvider>
|
|
35
|
+
<Shuffle />
|
|
36
|
+
<Card title="Notebook">
|
|
37
|
+
<Button variant="primary">Draw something</Button>
|
|
38
|
+
</Card>
|
|
39
|
+
</TooltipProvider>
|
|
40
|
+
</SketchSeedProvider>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Wrap the tree in `SketchSeedProvider` so a Shuffle action can redraw every unlocked sketch. Pass `seed={123}` on a component to lock its wobble.
|
|
46
|
+
|
|
47
|
+
## Shared sketch props
|
|
48
|
+
|
|
49
|
+
Every component accepts:
|
|
50
|
+
|
|
51
|
+
| Prop | Type | Default | Notes |
|
|
52
|
+
| --- | --- | --- | --- |
|
|
53
|
+
| `roughness` | `number` | `1.5` | Sketchiness intensity |
|
|
54
|
+
| `seed` | `number` | provider / random | Lock the pattern. Omit to follow Shuffle |
|
|
55
|
+
| `sketchColor` | `string` | `#1f1d1a` | Stroke color |
|
|
56
|
+
| `className` / `style` | standard | | Layout only. No bundled visual CSS framework |
|
|
57
|
+
|
|
58
|
+
## Components
|
|
59
|
+
|
|
60
|
+
Button, Input, Textarea, Checkbox, Radio, Card, Badge, Alert, Modal, Divider, Progress, Tooltip, plus the `RoughSvg` primitive.
|
|
61
|
+
|
|
62
|
+
## Docs
|
|
63
|
+
|
|
64
|
+
See the documentation site in `apps/docs` of this monorepo.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|