smoothui-cli 1.0.1 → 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.github.md +373 -31
- package/package.json +5 -3
package/README.github.md
CHANGED
|
@@ -1,71 +1,413 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SmoothUI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<div align="center">
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
[](https://actions-badge.atrox.dev/educlopez/smoothui/goto?ref=main)
|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
[](https://smoothui.dev)
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
SmoothUI is a collection of beautifully designed components with smooth animations built with React, Tailwind CSS, and Motion. This project aims to provide developers with a set of reusable UI components that enhance user experience through delightful animations and modern design patterns.
|
|
21
|
+
|
|
22
|
+
## Table of Contents
|
|
23
|
+
|
|
24
|
+
- [SmoothUI](#smoothui)
|
|
25
|
+
- [Table of Contents](#table-of-contents)
|
|
26
|
+
- [Features](#features)
|
|
27
|
+
- [Quick Start](#quick-start)
|
|
28
|
+
- [Installation](#installation)
|
|
29
|
+
- [Using SmoothUI CLI](#using-smoothui-cli)
|
|
30
|
+
- [Using shadcn CLI](#using-shadcn-cli)
|
|
31
|
+
- [Manual Installation](#manual-installation)
|
|
32
|
+
- [Usage](#usage)
|
|
33
|
+
- [Basic Usage](#basic-usage)
|
|
34
|
+
- [Advanced Usage](#advanced-usage)
|
|
35
|
+
- [Available Components](#available-components)
|
|
36
|
+
- [UI Components](#ui-components)
|
|
37
|
+
- [Interactive Components](#interactive-components)
|
|
38
|
+
- [Layout Components](#layout-components)
|
|
39
|
+
- [Utility Components](#utility-components)
|
|
40
|
+
- [MCP Support](#mcp-support)
|
|
41
|
+
- [🤖 AI Assistant Integration](#-ai-assistant-integration)
|
|
42
|
+
- [Quick MCP Setup](#quick-mcp-setup)
|
|
43
|
+
- [Registry System](#registry-system)
|
|
44
|
+
- [Automatic Dependencies](#automatic-dependencies)
|
|
45
|
+
- [Component Structure](#component-structure)
|
|
46
|
+
- [Registry Features](#registry-features)
|
|
47
|
+
- [Troubleshooting](#troubleshooting)
|
|
48
|
+
- [Common Issues](#common-issues)
|
|
49
|
+
- [1. Authentication Error (401)](#1-authentication-error-401)
|
|
50
|
+
- [2. Registry Not Found](#2-registry-not-found)
|
|
51
|
+
- [3. Import Path Issues](#3-import-path-issues)
|
|
52
|
+
- [4. Missing Dependencies](#4-missing-dependencies)
|
|
53
|
+
- [Getting Help](#getting-help)
|
|
54
|
+
- [Contributing](#contributing)
|
|
55
|
+
- [Development Setup](#development-setup)
|
|
56
|
+
- [License](#license)
|
|
57
|
+
|
|
58
|
+
## Features
|
|
59
|
+
|
|
60
|
+
- **Modern Design System**: A cohesive and contemporary design language with a new mascot called Smoothy
|
|
61
|
+
- **Smooth Animations**: Built-in animations powered by Motion for delightful user experiences
|
|
62
|
+
- **Responsive Design**: Fully responsive components designed with Tailwind CSS
|
|
63
|
+
- **Dark Mode Support**: Components support both light and dark themes out of the box
|
|
64
|
+
- **Color Customization**: Dynamic color switcher for easy theme customization
|
|
65
|
+
- **Documentation**: Comprehensive documentation with props, examples, and usage guidelines
|
|
66
|
+
- **Accessibility**: Enhanced accessibility features across all components
|
|
67
|
+
- **TypeScript Support**: Full TypeScript support with type definitions
|
|
68
|
+
- **Easy Integration**: Simple API for integrating components into your projects
|
|
69
|
+
- **CLI Tools**: Dedicated SmoothUI CLI and shadcn registry support for easy component installation
|
|
70
|
+
|
|
71
|
+
## Quick Start
|
|
72
|
+
|
|
73
|
+
Get started with SmoothUI in just one command:
|
|
6
74
|
|
|
7
75
|
```bash
|
|
76
|
+
# Using SmoothUI CLI (recommended)
|
|
8
77
|
npx smoothui-cli add siri-orb
|
|
78
|
+
|
|
79
|
+
# Or using shadcn CLI
|
|
80
|
+
npx shadcn@latest add @smoothui/siri-orb
|
|
9
81
|
```
|
|
10
82
|
|
|
11
|
-
|
|
83
|
+
Then use the component:
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { SiriOrb } from "@/components/smoothui/ui/SiriOrb";
|
|
87
|
+
|
|
88
|
+
export default function App() {
|
|
89
|
+
return <SiriOrb size="200px" />;
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Installation
|
|
12
94
|
|
|
13
|
-
###
|
|
95
|
+
### Using SmoothUI CLI
|
|
96
|
+
|
|
97
|
+
The SmoothUI CLI provides an interactive way to browse and install components with automatic dependency resolution.
|
|
14
98
|
|
|
15
99
|
```bash
|
|
16
100
|
# Add a single component
|
|
17
101
|
npx smoothui-cli add siri-orb
|
|
18
102
|
|
|
19
103
|
# Add multiple components
|
|
20
|
-
npx smoothui-cli add siri-orb
|
|
104
|
+
npx smoothui-cli add siri-orb rich-popover animated-input
|
|
21
105
|
|
|
22
|
-
# Interactive mode - browse and select
|
|
106
|
+
# Interactive mode - browse and select components
|
|
23
107
|
npx smoothui-cli add
|
|
108
|
+
|
|
109
|
+
# List all available components
|
|
110
|
+
npx smoothui-cli list
|
|
24
111
|
```
|
|
25
112
|
|
|
26
|
-
|
|
113
|
+
**Features:**
|
|
114
|
+
|
|
115
|
+
- Interactive component picker with search and categories
|
|
116
|
+
- Auto-detects package manager (npm, pnpm, yarn, bun)
|
|
117
|
+
- Auto-detects component paths and tsconfig aliases
|
|
118
|
+
- Shows dependency tree before installation
|
|
119
|
+
- Handles file conflicts with overwrite prompts
|
|
120
|
+
- Auto-installs npm dependencies
|
|
121
|
+
|
|
122
|
+
### Using shadcn CLI
|
|
123
|
+
|
|
124
|
+
SmoothUI is an official shadcn registry, so you can install components directly using the `@smoothui` namespace:
|
|
27
125
|
|
|
28
126
|
```bash
|
|
29
|
-
#
|
|
30
|
-
npx smoothui-
|
|
127
|
+
# Install a single component
|
|
128
|
+
npx shadcn@latest add @smoothui/siri-orb
|
|
31
129
|
|
|
32
|
-
#
|
|
33
|
-
npx smoothui-
|
|
130
|
+
# Install multiple components
|
|
131
|
+
npx shadcn@latest add @smoothui/rich-popover @smoothui/animated-input
|
|
34
132
|
```
|
|
35
133
|
|
|
36
|
-
###
|
|
134
|
+
### Manual Installation
|
|
135
|
+
|
|
136
|
+
If you prefer to install components manually, you can copy the component files directly:
|
|
137
|
+
|
|
138
|
+
1. **Install dependencies**:
|
|
37
139
|
|
|
38
140
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
141
|
+
pnpm add motion tailwindcss lucide-react clsx tailwind-merge
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
2. **Copy component files** from the [components directory](src/components/smoothui/ui/)
|
|
145
|
+
|
|
146
|
+
3. **Set up utilities**:
|
|
41
147
|
|
|
42
|
-
|
|
43
|
-
|
|
148
|
+
```bash
|
|
149
|
+
# Create lib/utils/cn.ts
|
|
150
|
+
mkdir -p lib/utils
|
|
44
151
|
```
|
|
45
152
|
|
|
46
|
-
|
|
153
|
+
```tsx
|
|
154
|
+
// lib/utils/cn.ts
|
|
155
|
+
import { clsx, type ClassValue } from "clsx";
|
|
156
|
+
import { twMerge } from "tailwind-merge";
|
|
47
157
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
158
|
+
export function cn(...inputs: ClassValue[]) {
|
|
159
|
+
return twMerge(clsx(inputs));
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Usage
|
|
164
|
+
|
|
165
|
+
### Basic Usage
|
|
166
|
+
|
|
167
|
+
```tsx
|
|
168
|
+
import { SiriOrb } from "@/components/smoothui/ui/SiriOrb";
|
|
169
|
+
|
|
170
|
+
export default function App() {
|
|
171
|
+
return (
|
|
172
|
+
<div className="flex min-h-screen items-center justify-center">
|
|
173
|
+
<SiriOrb
|
|
174
|
+
size="200px"
|
|
175
|
+
colors={{
|
|
176
|
+
bg: "oklch(95% 0.02 264.695)",
|
|
177
|
+
c1: "oklch(75% 0.15 350)",
|
|
178
|
+
c2: "oklch(80% 0.12 200)",
|
|
179
|
+
c3: "oklch(78% 0.14 280)",
|
|
180
|
+
}}
|
|
181
|
+
animationDuration={20}
|
|
182
|
+
/>
|
|
183
|
+
</div>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Advanced Usage
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
import { RichPopover } from "@/components/smoothui/ui/RichPopover";
|
|
192
|
+
import { ScrollableCardStack } from "@/components/smoothui/ui/ScrollableCardStack";
|
|
193
|
+
|
|
194
|
+
export default function Dashboard() {
|
|
195
|
+
const cards = [
|
|
196
|
+
{
|
|
197
|
+
id: "1",
|
|
198
|
+
name: "John Doe",
|
|
199
|
+
handle: "@johndoe",
|
|
200
|
+
avatar: "/avatars/john.jpg",
|
|
201
|
+
video: "/videos/john.mp4",
|
|
202
|
+
href: "https://twitter.com/johndoe",
|
|
203
|
+
},
|
|
204
|
+
// ... more cards
|
|
205
|
+
];
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
<div className="space-y-8">
|
|
209
|
+
<RichPopover />
|
|
210
|
+
<ScrollableCardStack items={cards} />
|
|
211
|
+
</div>
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Available Components
|
|
217
|
+
|
|
218
|
+
SmoothUI includes a wide variety of components:
|
|
219
|
+
|
|
220
|
+
### UI Components
|
|
221
|
+
|
|
222
|
+
- **SiriOrb** - Animated orb with smooth color transitions
|
|
223
|
+
- **RichPopover** - Advanced popover with rich content
|
|
224
|
+
- **ScrollableCardStack** - Interactive card stack with smooth scrolling
|
|
225
|
+
- **AnimatedInput** - Input field with smooth animations
|
|
226
|
+
- **DynamicIsland** - iOS-style dynamic island component
|
|
227
|
+
- **FluidMorph** - Fluid morphing animations
|
|
228
|
+
- **MatrixCard** - Matrix-style card with particle effects
|
|
229
|
+
|
|
230
|
+
### Interactive Components
|
|
231
|
+
|
|
232
|
+
- **CursorFollow** - Custom cursor following component
|
|
233
|
+
- **ScrambleHover** - Text scramble effect on hover
|
|
234
|
+
- **WaveText** - Animated wave text effect
|
|
235
|
+
- **TypewriterText** - Typewriter text animation
|
|
236
|
+
|
|
237
|
+
### Layout Components
|
|
238
|
+
|
|
239
|
+
- **ExpandableCards** - Expandable card layout
|
|
240
|
+
- **ScrollableCardStack** - Stack of scrollable cards
|
|
241
|
+
- **AppDownloadStack** - App download showcase
|
|
242
|
+
|
|
243
|
+
### Utility Components
|
|
54
244
|
|
|
55
|
-
|
|
245
|
+
- **ButtonCopy** - Copy button with feedback
|
|
246
|
+
- **ClipCornersButton** - Button with clipped corners
|
|
247
|
+
- **DotMorphButton** - Button with morphing dot animation
|
|
56
248
|
|
|
57
|
-
|
|
249
|
+
[View all components →](https://smoothui.dev)
|
|
250
|
+
|
|
251
|
+
## MCP Support
|
|
252
|
+
|
|
253
|
+
SmoothUI is fully compatible with the **shadcn MCP server**, enabling AI assistants to discover and install components automatically.
|
|
254
|
+
|
|
255
|
+
### 🤖 AI Assistant Integration
|
|
256
|
+
|
|
257
|
+
With MCP support, AI assistants like **Claude**, **Cursor**, and **GitHub Copilot** can:
|
|
258
|
+
|
|
259
|
+
- **Discover Components**: Browse all available SmoothUI components
|
|
260
|
+
- **Install Components**: Automatically install components with dependencies
|
|
261
|
+
- **Provide Usage Examples**: Get code examples and integration help
|
|
262
|
+
- **Smart Suggestions**: Receive intelligent component recommendations
|
|
263
|
+
|
|
264
|
+
### Quick MCP Setup
|
|
265
|
+
|
|
266
|
+
1. **Configure your registry** in `components.json`:
|
|
267
|
+
|
|
268
|
+
```json
|
|
269
|
+
{
|
|
270
|
+
"registries": {
|
|
271
|
+
"@smoothui": "https://smoothui.dev/r/{name}.json"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
2. **Install MCP server**:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
npx shadcn@latest mcp init --client claude
|
|
280
|
+
# or for Cursor: npx shadcn@latest mcp init --client cursor
|
|
281
|
+
# or for VS Code: npx shadcn@latest mcp init --client vscode
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
3. **Try these prompts**:
|
|
285
|
+
|
|
286
|
+
- "Show me the components in the smoothui registry"
|
|
287
|
+
- "Install the SiriOrb component from smoothui"
|
|
288
|
+
- "Create a landing page using smoothui components"
|
|
289
|
+
|
|
290
|
+
[Learn more about MCP support →](https://smoothui.dev/doc/mcp)
|
|
291
|
+
|
|
292
|
+
## Registry System
|
|
293
|
+
|
|
294
|
+
SmoothUI uses a custom registry system compatible with shadcn CLI v3. Each component includes:
|
|
295
|
+
|
|
296
|
+
### Automatic Dependencies
|
|
297
|
+
|
|
298
|
+
- **Package Dependencies**: Required npm packages are automatically included
|
|
299
|
+
- **Utility Files**: Shared utilities like `cn` are automatically bundled
|
|
300
|
+
- **Import Paths**: All import paths are automatically resolved
|
|
301
|
+
|
|
302
|
+
### Component Structure
|
|
303
|
+
|
|
304
|
+
When you install a component, you get:
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
components/smoothui/ui/
|
|
308
|
+
├── ComponentName.tsx # Main component file
|
|
309
|
+
lib/utils/
|
|
310
|
+
└── cn.ts # Utility functions (if needed)
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Registry Features
|
|
314
|
+
|
|
315
|
+
- **Self-contained**: Each component includes all necessary dependencies
|
|
316
|
+
- **Type-safe**: Full TypeScript support with proper types
|
|
317
|
+
- **Optimized**: Components are optimized for performance
|
|
318
|
+
- **Accessible**: Built-in accessibility features
|
|
319
|
+
|
|
320
|
+
## Troubleshooting
|
|
321
|
+
|
|
322
|
+
### Common Issues
|
|
323
|
+
|
|
324
|
+
#### 1. Authentication Error (401)
|
|
325
|
+
|
|
326
|
+
**Error**: `You are not authorized to access the item`
|
|
327
|
+
|
|
328
|
+
**Solution**: This usually happens with Vercel preview deployments. Use the production URL:
|
|
329
|
+
|
|
330
|
+
```json
|
|
331
|
+
{
|
|
332
|
+
"registries": {
|
|
333
|
+
"@smoothui": "https://smoothui.dev/r/{name}.json"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
#### 2. Registry Not Found
|
|
339
|
+
|
|
340
|
+
**Error**: `The item at https://smoothui.dev/r/registry.json was not found`
|
|
341
|
+
|
|
342
|
+
**Solution**: The search command might not work as expected. Install components directly:
|
|
58
343
|
|
|
59
344
|
```bash
|
|
60
345
|
npx shadcn@latest add @smoothui/siri-orb
|
|
61
346
|
```
|
|
62
347
|
|
|
63
|
-
|
|
348
|
+
#### 3. Import Path Issues
|
|
349
|
+
|
|
350
|
+
**Error**: `Cannot find module '@/lib/utils/cn'`
|
|
351
|
+
|
|
352
|
+
**Solution**: Make sure your `tsconfig.json` includes the path alias:
|
|
353
|
+
|
|
354
|
+
```json
|
|
355
|
+
{
|
|
356
|
+
"compilerOptions": {
|
|
357
|
+
"paths": {
|
|
358
|
+
"@/*": ["./src/*"]
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
#### 4. Missing Dependencies
|
|
365
|
+
|
|
366
|
+
**Error**: `Cannot find module 'clsx'`
|
|
367
|
+
|
|
368
|
+
**Solution**: Install missing dependencies:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
pnpm add clsx tailwind-merge motion
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Getting Help
|
|
375
|
+
|
|
376
|
+
- **Documentation**: Visit [smoothui.dev](https://smoothui.dev) for detailed documentation
|
|
377
|
+
- **Issues**: Report bugs on [GitHub Issues](https://github.com/educlopez/smoothui/issues)
|
|
378
|
+
- **Discussions**: Join discussions on [GitHub Discussions](https://github.com/educlopez/smoothui/discussions)
|
|
379
|
+
|
|
380
|
+
## Contributing
|
|
381
|
+
|
|
382
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
64
383
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
384
|
+
### Development Setup
|
|
385
|
+
|
|
386
|
+
1. **Clone the repository**:
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
git clone https://github.com/educlopez/smoothui.git
|
|
390
|
+
cd smoothui
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
2. **Install dependencies**:
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
pnpm install
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
3. **Start development server**:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
pnpm dev
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
4. **Build registry**:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
pnpm run build:registry
|
|
409
|
+
```
|
|
68
410
|
|
|
69
411
|
## License
|
|
70
412
|
|
|
71
|
-
MIT
|
|
413
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smoothui-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"author": "educalvolpz",
|
|
5
5
|
"description": "CLI to install SmoothUI components - beautifully designed React components with smooth animations",
|
|
6
6
|
"private": false,
|
|
@@ -25,10 +25,12 @@
|
|
|
25
25
|
"url": "https://github.com/educlopez/smoothui/issues"
|
|
26
26
|
},
|
|
27
27
|
"bin": {
|
|
28
|
-
"smoothui": "dist/index.js"
|
|
28
|
+
"smoothui": "dist/index.js",
|
|
29
|
+
"smoothui-cli": "dist/index.js"
|
|
29
30
|
},
|
|
30
31
|
"files": [
|
|
31
|
-
"dist/index.js"
|
|
32
|
+
"dist/index.js",
|
|
33
|
+
"README.md"
|
|
32
34
|
],
|
|
33
35
|
"scripts": {
|
|
34
36
|
"prepublishOnly": "cp README.md README.github.md && cp README.npm.md README.md",
|