@marv3l/canopy-ui 1.0.2 → 1.0.4

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 CHANGED
@@ -1,261 +1,291 @@
1
- # Canopy UI
1
+ # <img src="./public/favicon.ico" width="48" height="48" align="center" /> Canopy UI
2
2
 
3
- > A modern, copy-and-paste CLI for adding customizable UI components directly to React and Next.js codebases.
3
+ <div align="center">
4
4
 
5
- Canopy UI installs component source code into your project, giving you full ownership over the markup, styles, behavior, and design tokens. Customize components as much as you need—without being locked into a hosted UI library.
5
+ ### Custom UI Components for React & Next.js
6
6
 
7
- ## Quick Start
7
+ A modern npm package for building beautiful, customizable user interfaces.
8
8
 
9
- Add a component with one command:
9
+ <br />
10
10
 
11
- ```bash
12
- npx canopy-ui add toast
13
- ```
11
+ [![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge\&logo=npm\&logoColor=white)](https://www.npmjs.com/package/canopy-ui)
12
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge\&logo=typescript\&logoColor=white)](https://www.typescriptlang.org/)
13
+ [![React](https://img.shields.io/badge/React-20232A?style=for-the-badge\&logo=react\&logoColor=61DAFB)](https://react.dev/)
14
+ [![Next.js](https://img.shields.io/badge/Next.js-000000?style=for-the-badge\&logo=nextdotjs\&logoColor=white)](https://nextjs.org/)
14
15
 
15
- Run the command without a component name to open an interactive multi-select prompt:
16
+ <br />
16
17
 
17
- ```bash
18
- npx canopy-ui add
19
- ```
18
+ <a href="https://canopy-ui-web.vercel.app/">
19
+
20
+ <img src="https://img.shields.io/badge/Documentation-Canopy%20UI-7C3AED?style=for-the-badge&logo=readthedocs&logoColor=white" />
21
+
22
+ </a>
23
+
24
+ <a href="https://www.npmjs.com/package/canopy-ui">
25
+
26
+ <img src="https://img.shields.io/badge/npm-View%20Package-CB3837?style=for-the-badge&logo=npm&logoColor=white" />
27
+
28
+ </a>
29
+
30
+ <a href="https://github.com/ShawnR04/canopy-ui">
31
+
32
+ <img src="https://img.shields.io/badge/GitHub-Repository-181717?style=for-the-badge&logo=github&logoColor=white" />
33
+
34
+ </a>
35
+
36
+ </div>
37
+
38
+ <br />
20
39
 
21
40
  ---
22
41
 
23
- ## Components
42
+ ## <img src="https://api.iconify.design/lucide/book-open.svg?color=%233B82F6" width="25" /> About Canopy UI
43
+
44
+ **Canopy UI** is a customizable UI component library for **React** and **Next.js** applications.
45
+
46
+ The project is built around a simple idea: provide developers with modern, polished UI components that are easy to integrate and customize.
47
+
48
+ Canopy UI currently provides a **Toast notification component**, with additional components planned for the future.
49
+
50
+ > **Simple components. Flexible design. Built for your application.**
51
+
52
+ ---
53
+
54
+ ## <img src="https://api.iconify.design/lucide/layers-3.svg?color=%238B5CF6" width="25" /> Components
55
+
56
+ <div align="center">
57
+
58
+ <table>
59
+ <tr>
60
+
61
+ <td align="center" width="50%">
62
+
63
+ <img src="https://api.iconify.design/lucide/bell.svg?color=%23F59E0B" width="42" />
64
+
65
+ <br /><br />
66
+
67
+ <b>Toast</b>
68
+
69
+ <br />
70
+
71
+ Customizable notification component with configurable variants, colors, positioning, durations, and styling.
72
+
73
+ <br /><br />
74
+
75
+ <img src="https://img.shields.io/badge/Available-22C55E?style=flat-square&logoColor=white" />
76
+
77
+ </td>
78
+
79
+ <td align="center" width="50%">
80
+
81
+ <img src="https://api.iconify.design/lucide/sparkles.svg?color=%238B5CF6" width="42" />
82
+
83
+ <br /><br />
84
+
85
+ <b>More Coming Soon</b>
86
+
87
+ <br />
88
+
89
+ Canopy UI is actively growing with additional components planned for future releases.
90
+
91
+ <br /><br />
92
+
93
+ <img src="https://img.shields.io/badge/Coming%20Soon-8B5CF6?style=flat-square&logoColor=white" />
94
+
95
+ </td>
96
+
97
+ </tr>
98
+ </table>
99
+
100
+ </div>
101
+
102
+ ---
103
+
104
+ ## <img src="https://api.iconify.design/lucide/sparkles.svg?color=%23F59E0B" width="25" /> Features
105
+
106
+ <div align="center">
107
+
108
+ <table>
109
+ <tr>
110
+
111
+ <td align="center" width="25%">
112
+
113
+ <img src="https://api.iconify.design/lucide/palette.svg?color=%23EC4899" width="36" />
114
+
115
+ <br /><br />
116
+
117
+ <b>Customizable</b>
118
+
119
+ <br />
24
120
 
25
- ### Toast
121
+ Designed to adapt to your application's visual style.
26
122
 
27
- A customizable, animated notification system with:
123
+ </td>
28
124
 
29
- - Built-in `success` and `error` variants
30
- - Configurable global default duration
31
- - Configurable screen position
32
- - Per-toast duration overrides
33
- - Custom colors using hex values, CSS variables, or design tokens
34
- - Progress-bar color controls
35
- - Direct Tailwind `className` overrides
125
+ <td align="center" width="25%">
36
126
 
37
- ## Installation
127
+ <img src="https://api.iconify.design/lucide/code-2.svg?color=%238B5CF6" width="36" />
38
128
 
39
- Install the Toast component into your project:
129
+ <br /><br />
40
130
 
41
- ```bash
42
- npx canopy-ui add toast
43
- ```
131
+ <b>Developer Friendly</b>
44
132
 
45
- The component is added to your local UI directory, typically under:
133
+ <br />
46
134
 
47
- ```text
48
- components/ui/toast.tsx
49
- components/ui/use-toast.ts
50
- ```
135
+ Built with modern React and TypeScript.
51
136
 
52
- > The exact generated paths may depend on your project's configured import aliases.
137
+ </td>
138
+
139
+ <td align="center" width="25%">
140
+
141
+ <img src="https://api.iconify.design/lucide/zap.svg?color=%23F59E0B" width="36" />
142
+
143
+ <br /><br />
144
+
145
+ <b>Lightweight</b>
146
+
147
+ <br />
148
+
149
+ Focused components without unnecessary complexity.
150
+
151
+ </td>
152
+
153
+ <td align="center" width="25%">
154
+
155
+ <img src="https://api.iconify.design/lucide/settings-2.svg?color=%233B82F6" width="36" />
156
+
157
+ <br /><br />
158
+
159
+ <b>Flexible</b>
160
+
161
+ <br />
162
+
163
+ Designed to work with your existing application and design system.
164
+
165
+ </td>
166
+
167
+ </tr>
168
+ </table>
169
+
170
+ </div>
53
171
 
54
172
  ---
55
173
 
56
- ## Setup
57
-
58
- Mount `Toaster` once in your root `app/layout.tsx`. This provides the toast viewport for all routes in your application.
59
-
60
- ```tsx
61
- import type { Metadata } from "next";
62
- import { Geist, Geist_Mono } from "next/font/google";
63
-
64
- import "./globals.css";
65
- import { Toaster } from "@/components/ui/toast";
66
-
67
- const geistSans = Geist({
68
- variable: "--font-geist-sans",
69
- subsets: ["latin"],
70
- });
71
-
72
- const geistMono = Geist_Mono({
73
- variable: "--font-geist-mono",
74
- subsets: ["latin"],
75
- });
76
-
77
- export const metadata: Metadata = {
78
- title: "My App",
79
- description: "My application",
80
- };
81
-
82
- export default function RootLayout({
83
- children,
84
- }: Readonly<{
85
- children: React.ReactNode;
86
- }>) {
87
- return (
88
- <html
89
- lang="en"
90
- className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
91
- >
92
- <body className="flex min-h-full flex-col">
93
- {children}
94
- <Toaster defaultDuration={3500} position="top-center" />
95
- </body>
96
- </html>
97
- );
98
- }
99
- ```
100
-
101
- ### `Toaster` Props
102
-
103
- | Prop | Type | Description |
104
- | --- | --- | --- |
105
- | `defaultDuration` | `number` | Default time, in milliseconds, before a toast dismisses. Individual toasts can override it. |
106
- | `position` | `string` | Position of the toast viewport, for example `"top-center"`. |
174
+ ## <img src="https://api.iconify.design/lucide/book-open.svg?color=%233B82F6" width="25" /> Documentation
175
+
176
+ The complete Canopy UI documentation is available on the official documentation site.
177
+
178
+ It includes:
179
+
180
+ * Component installation
181
+ * Configuration
182
+ * Usage
183
+ * API references
184
+ * Customization
185
+ * Examples
186
+ * CLI documentation
187
+
188
+ <div align="center">
189
+
190
+ <a href="https://canopy-ui-web.vercel.app/">
191
+
192
+ <img src="https://img.shields.io/badge/Read%20the%20Documentation-7C3AED?style=for-the-badge&logo=readthedocs&logoColor=white" />
193
+
194
+ </a>
195
+
196
+ </div>
107
197
 
108
198
  ---
109
199
 
110
- ## Usage
200
+ ## <img src="https://api.iconify.design/lucide/layers.svg?color=%2306B6D4" width="25" /> Tech Stack
111
201
 
112
- Import `toast` inside a client component, then call it from an event handler or client-side action.
202
+ <div align="center">
113
203
 
114
- ```tsx
115
- "use client";
204
+ [![React](https://img.shields.io/badge/React-20232A?style=for-the-badge\&logo=react\&logoColor=61DAFB)](https://react.dev/)
205
+ [![Next.js](https://img.shields.io/badge/Next.js-000000?style=for-the-badge\&logo=nextdotjs\&logoColor=white)](https://nextjs.org/)
206
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge\&logo=typescript\&logoColor=white)](https://www.typescriptlang.org/)
207
+ [![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge\&logo=npm\&logoColor=white)](https://www.npmjs.com/)
116
208
 
117
- import { toast } from "@/components/ui/use-toast";
209
+ </div>
118
210
 
119
- export default function Page() {
120
- return (
121
- <button
122
- onClick={() =>
123
- toast({
124
- variant: "success",
125
- title: "Changes saved",
126
- description: "Your preferences were updated successfully.",
127
- })
128
- }
129
- >
130
- Show toast
131
- </button>
132
- );
133
- }
134
- ```
211
+ ---
212
+
213
+ ## <img src="https://api.iconify.design/lucide/heart.svg?color=%23EC4899" width="25" /> Philosophy
214
+
215
+ Canopy UI is built around a simple principle:
216
+
217
+ > **Build beautiful UI without unnecessary complexity.**
218
+
219
+ Components should be easy to integrate, easy to customize, and flexible enough to fit into different applications.
220
+
221
+ Canopy UI aims to provide a growing collection of components that developers can rely on when building modern interfaces.
222
+
223
+ ---
224
+
225
+ ## <img src="https://api.iconify.design/lucide/rocket.svg?color=%23EF4444" width="25" /> Roadmap
226
+
227
+ Canopy UI currently includes:
228
+
229
+ * <img src="https://api.iconify.design/lucide/check-circle-2.svg?color=%2322C55E" width="18" /> Toast
230
+
231
+ Additional components are planned for future releases.
135
232
 
136
233
  ---
137
234
 
138
- ## Examples
139
-
140
- ### Success Toast
141
-
142
- ```tsx
143
- toast({
144
- variant: "success",
145
- title: "Changes saved",
146
- description: "Your preferences were updated successfully.",
147
- });
148
- ```
149
-
150
- ### Error Toast
151
-
152
- ```tsx
153
- toast({
154
- variant: "error",
155
- title: "Action failed",
156
- description: "Could not connect to the remote server.",
157
- });
158
- ```
159
-
160
- ### Custom Colors and Duration
161
-
162
- Use `customColor` to override the toast palette. Values can be literal CSS colors, such as hex values, or CSS custom properties such as `var(--primary)`.
163
-
164
- ```tsx
165
- toast({
166
- title: "Pro subscription unlocked",
167
- description: "Welcome to VIP perks and custom styling.",
168
- duration: 5000,
169
- customColor: {
170
- bg: "var(--card)",
171
- border: "var(--primary)",
172
- text: "var(--card-foreground)",
173
- icon: "var(--primary)",
174
- progress: "var(--primary)",
175
- },
176
- });
177
- ```
178
-
179
- ### Tailwind Class Override
180
-
181
- Use `className` when you want to apply direct Tailwind utility classes to an individual toast.
182
-
183
- ```tsx
184
- toast({
185
- title: "Tailwind classes applied",
186
- description: "Styled with direct className overrides.",
187
- duration: 3500,
188
- customColor: {
189
- progress: "var(--destructive)",
190
- },
191
- className: "border-destructive/40 bg-card text-primary",
192
- });
193
- ```
235
+ ## <img src="https://api.iconify.design/lucide/github.svg?color=%23181717" width="25" /> Repository
236
+
237
+ Canopy UI is open source and available on GitHub.
238
+
239
+ <div align="center">
240
+
241
+ <a href="https://github.com/ShawnR04/canopy-ui">
242
+
243
+ <img src="https://img.shields.io/badge/View%20Source%20Code-GitHub-181717?style=for-the-badge&logo=github&logoColor=white" />
244
+
245
+ </a>
246
+
247
+ </div>
194
248
 
195
249
  ---
196
250
 
197
- ## Toast API
198
-
199
- ```ts
200
- toast({
201
- variant?: "success" | "error";
202
- title?: string;
203
- description?: string;
204
- duration?: number;
205
- customColor?: {
206
- bg?: string;
207
- border?: string;
208
- text?: string;
209
- icon?: string;
210
- progress?: string;
211
- };
212
- className?: string;
213
- });
214
- ```
215
-
216
- | Option | Description |
217
- | --- | --- |
218
- | `variant` | Applies a built-in visual style, such as `"success"` or `"error"`. |
219
- | `title` | Primary toast message. |
220
- | `description` | Supporting text displayed below the title. |
221
- | `duration` | Dismiss timeout in milliseconds. Overrides `Toaster`’s `defaultDuration`. |
222
- | `customColor.bg` | Toast background color. |
223
- | `customColor.border` | Toast border color. |
224
- | `customColor.text` | Toast text color. |
225
- | `customColor.icon` | Toast icon color. |
226
- | `customColor.progress` | Toast progress-bar color. |
227
- | `className` | Tailwind or custom CSS classes applied directly to the toast. |
251
+ ## <img src="https://api.iconify.design/lucide/scale.svg?color=%2322C55E" width="25" /> License
252
+
253
+ Canopy UI is licensed under the **MIT License**.
254
+
255
+ Copyright © 2026 **Shawn Rimai**
228
256
 
229
257
  ---
230
258
 
231
- ## Development
259
+ <div align="center">
260
+
261
+ <img src="./public/favicon.ico" width="42" height="42" align="center" />
262
+
263
+ ### Canopy UI
264
+
265
+ **Custom UI. Simple integration. Flexible design.**
266
+
267
+ <br />
268
+
269
+ <a href="https://canopy-ui-web.vercel.app/">
232
270
 
233
- Build the CLI:
271
+ <img src="https://img.shields.io/badge/Documentation-Visit%20Canopy%20UI-7C3AED?style=for-the-badge&logo=readthedocs&logoColor=white" />
234
272
 
235
- ```bash
236
- npm run build
237
- ```
273
+ </a>
238
274
 
239
- Link the package locally:
275
+ <a href="https://www.npmjs.com/package/canopy-ui">
240
276
 
241
- ```bash
242
- npm link
243
- ```
277
+ <img src="https://img.shields.io/badge/npm-Canopy%20UI-CB3837?style=for-the-badge&logo=npm&logoColor=white" />
244
278
 
245
- Then, inside a sample React or Next.js project, install a component through the linked CLI:
279
+ </a>
246
280
 
247
- ```bash
248
- canopy-ui add toast
249
- ```
281
+ <a href="https://github.com/ShawnR04/canopy-ui">
250
282
 
251
- ## Publishing
283
+ <img src="https://img.shields.io/badge/GitHub-ShawnR04-181717?style=for-the-badge&logo=github&logoColor=white" />
252
284
 
253
- Publish the package to npm:
285
+ </a>
254
286
 
255
- ```bash
256
- npm publish --access public
257
- ```
287
+ <br /><br />
258
288
 
259
- ## License
289
+ <sub>Built by Shawn Rimai</sub>
260
290
 
261
- MIT © Shawn Rimai
291
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marv3l/canopy-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "An accessible, themable React UI component library built for fast-moving web applications.",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {
@@ -48,7 +48,7 @@ export interface ToastItem extends ToastOptions {
48
48
  // Maximum number of visible toast cards on screen simultaneously
49
49
  const TOAST_LIMIT = 5;
50
50
  // Delay before removed toasts are completely purged from memory (allows exit transition)
51
- const TOAST_REMOVE_DELAY = 200;
51
+ const TOAST_REMOVE_DELAY = 500;
52
52
 
53
53
  // Discriminated union type representing all possible reducer actions
54
54
  type Action =