@thetinycode/hash-ui 1.0.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 +189 -0
- package/dist/index.cjs +1111 -0
- package/dist/index.d.cts +182 -0
- package/dist/index.d.ts +182 -0
- package/dist/index.js +1000 -0
- package/dist/styles.css +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 πΆπͺππΎπ·ππͺ
|
|
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,189 @@
|
|
|
1
|
+
# #UI β hash-ui
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
**hash-ui** is a lightweight collection of composable React UI primitives built with Tailwind CSS. It provides layout components, forms, overlays, navigation, and marketing blocks to help you build modern interfaces quickly β without locking you into a rigid design system.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- React component primitives with full TypeScript support
|
|
16
|
+
- Tailwind CSS v4 powered styling β fully customisable
|
|
17
|
+
- Composable architecture β mix and match freely
|
|
18
|
+
- Works with Next.js, Vite, and any React framework
|
|
19
|
+
- Tree-shakable package build
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
- React 18+
|
|
26
|
+
- Tailwind CSS v4
|
|
27
|
+
- Node.js 18+
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# pnpm
|
|
35
|
+
pnpm add @thetinycode/hash-ui
|
|
36
|
+
|
|
37
|
+
# npm
|
|
38
|
+
npm install @thetinycode/hash-ui
|
|
39
|
+
|
|
40
|
+
# yarn
|
|
41
|
+
yarn add @thetinycode/hash-ui
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Setup
|
|
47
|
+
|
|
48
|
+
### 1. Tailwind Configuration
|
|
49
|
+
|
|
50
|
+
hash-ui uses Tailwind CSS utilities internally. Add the library as a source in your global CSS file so Tailwind can detect its classes:
|
|
51
|
+
|
|
52
|
+
```css
|
|
53
|
+
@import "tailwindcss";
|
|
54
|
+
@source "../node_modules/@thetinycode/hash-ui";
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2. Import Styles
|
|
58
|
+
|
|
59
|
+
Import the library stylesheet in your app root. For Next.js App Router, add this to your root layout:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import "@thetinycode/hash-ui/styles.css"
|
|
63
|
+
import "./globals.css"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Basic Usage
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import {
|
|
72
|
+
Section,
|
|
73
|
+
Container,
|
|
74
|
+
Stack,
|
|
75
|
+
Badge,
|
|
76
|
+
Card,
|
|
77
|
+
CardHeader,
|
|
78
|
+
CardTitle,
|
|
79
|
+
CardContent,
|
|
80
|
+
Input,
|
|
81
|
+
Button,
|
|
82
|
+
Grid
|
|
83
|
+
} from "@thetinycode/hash-ui"
|
|
84
|
+
|
|
85
|
+
export default function Demo() {
|
|
86
|
+
return (
|
|
87
|
+
<Section>
|
|
88
|
+
<Container>
|
|
89
|
+
<Stack gap="lg">
|
|
90
|
+
|
|
91
|
+
<Badge variant="success">hash-ui works</Badge>
|
|
92
|
+
|
|
93
|
+
<Card>
|
|
94
|
+
<CardHeader>
|
|
95
|
+
<CardTitle>Hello from #UI</CardTitle>
|
|
96
|
+
</CardHeader>
|
|
97
|
+
<CardContent>
|
|
98
|
+
<Stack gap="md">
|
|
99
|
+
<Input placeholder="Type something..." />
|
|
100
|
+
<Button>Click me</Button>
|
|
101
|
+
</Stack>
|
|
102
|
+
</CardContent>
|
|
103
|
+
</Card>
|
|
104
|
+
|
|
105
|
+
<Grid cols={3}>
|
|
106
|
+
<Card className="p-4">One</Card>
|
|
107
|
+
<Card className="p-4">Two</Card>
|
|
108
|
+
<Card className="p-4">Three</Card>
|
|
109
|
+
</Grid>
|
|
110
|
+
|
|
111
|
+
</Stack>
|
|
112
|
+
</Container>
|
|
113
|
+
</Section>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Components
|
|
121
|
+
|
|
122
|
+
| Category | Components |
|
|
123
|
+
|----------|------------|
|
|
124
|
+
| **Layout** | `Box` `Container` `Stack` `Grid` `Section` `Divider` |
|
|
125
|
+
| **Forms** | `Button` `Input` `Textarea` `Select` `Checkbox` `Switch` `Label` |
|
|
126
|
+
| **Display** | `Card` `Badge` `Avatar` `Alert` `Stat` `EmptyState` |
|
|
127
|
+
| **Navigation** | `Header` `Tabs` `Breadcrumb` `Pagination` |
|
|
128
|
+
| **Overlays** | `Modal` `Drawer` `Dropdown` `Tooltip` `Toast` |
|
|
129
|
+
| **Marketing** | `Hero` |
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Project Structure
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
hash-ui/
|
|
137
|
+
βββ src/
|
|
138
|
+
β βββ components/
|
|
139
|
+
β β βββ primitives/ # Layout components
|
|
140
|
+
β β βββ forms/ # Form inputs & controls
|
|
141
|
+
β β βββ display/ # Data & content display
|
|
142
|
+
β β βββ navigation/ # Nav elements
|
|
143
|
+
β β βββ overlays/ # Modals, drawers & tooltips
|
|
144
|
+
β β βββ marketing/ # Landing page blocks
|
|
145
|
+
β βββ lib/
|
|
146
|
+
β β βββ cn.ts # Class utility helper
|
|
147
|
+
β βββ index.ts # Package entry point
|
|
148
|
+
β βββ styles.css # Exported stylesheet
|
|
149
|
+
βββ dist/
|
|
150
|
+
βββ package.json
|
|
151
|
+
βββ tsconfig.json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Development
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Clone and install
|
|
160
|
+
git clone https://github.com/thetinycode/hash-ui
|
|
161
|
+
cd hash-ui
|
|
162
|
+
pnpm install
|
|
163
|
+
|
|
164
|
+
# Build β output written to dist/
|
|
165
|
+
pnpm build
|
|
166
|
+
|
|
167
|
+
# Preview package tarball
|
|
168
|
+
npm pack
|
|
169
|
+
|
|
170
|
+
# Publish to npm
|
|
171
|
+
pnpm publish --access public
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Roadmap
|
|
177
|
+
|
|
178
|
+
| Version | Status | Planned |
|
|
179
|
+
|---------|--------|---------|
|
|
180
|
+
| **v0.1** | β
Current | Core primitives, Forms, Display, Navigation, Overlays |
|
|
181
|
+
| **v0.2** | π Planned | `IconButton`, `ButtonGroup`, `InputGroup`, `AvatarGroup`, Notification system |
|
|
182
|
+
| **v0.3** | π Planned | `Navbar`, `Sidebar`, `Accordion`, Command palette, Theme support |
|
|
183
|
+
| **v1.0** | π― Future | Full docs, Demo site, Storybook, Accessibility, Animation utilities |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT β Created by [Mawunya](https://github.com/Mawunya3)
|