adaptive-ui-react 0.0.0-stage → 0.1.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/README.md +202 -2
- package/dist/index.cjs +1861 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +264 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +238 -0
- package/dist/index.d.ts +238 -0
- package/dist/index.js +1815 -0
- package/dist/index.js.map +1 -0
- package/dist/style.css +2 -0
- package/package.json +81 -4
package/README.md
CHANGED
|
@@ -1,3 +1,203 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Adaptive UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A collection of beautifully crafted, production-ready interactive React and Next.js animated components. Built with high-performance CSS transforms, HTML5 Canvas, GSAP, Lenis, and Motion.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install `adaptive-ui-react` and its peer dependencies in your React or Next.js project:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install adaptive-ui-react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or with your preferred package manager:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# pnpm
|
|
19
|
+
pnpm add adaptive-ui-react
|
|
20
|
+
|
|
21
|
+
# yarn
|
|
22
|
+
yarn add adaptive-ui-react
|
|
23
|
+
|
|
24
|
+
# bun
|
|
25
|
+
bun add adaptive-ui-react
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Setup Styles
|
|
31
|
+
|
|
32
|
+
Import the component stylesheet once in your application root (e.g. `app/layout.jsx` or `main.jsx`):
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
import "adaptive-ui-react/style.css";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
> **Note on Styling & Tailwind CSS:**
|
|
39
|
+
> `adaptive-ui` works out of the box with or without Tailwind CSS. All keyframe animations, mask gradients, CSS Modules, and required utility classes are compiled into `adaptive-ui/style.css`. If your project already uses Tailwind CSS (v3 or v4), you can freely pass custom `className` props to override or extend styles.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Components & Usage Examples
|
|
44
|
+
|
|
45
|
+
### 1. ImageScroll (Infinite Image Scroll)
|
|
46
|
+
|
|
47
|
+
An adaptive, seamless infinite scrolling track for image galleries and cards. Supports vertical columns, horizontal rows, organic speed staggering, and gradient edge masks.
|
|
48
|
+
|
|
49
|
+
```jsx
|
|
50
|
+
import { ImageScroll } from "adaptive-ui-react";
|
|
51
|
+
|
|
52
|
+
export default function GalleryPage() {
|
|
53
|
+
return (
|
|
54
|
+
<div className="w-full">
|
|
55
|
+
{/* Vertical 3-Column Scrolling */}
|
|
56
|
+
<ImageScroll
|
|
57
|
+
direction="vertical"
|
|
58
|
+
columns={3}
|
|
59
|
+
speed={1}
|
|
60
|
+
height="600px"
|
|
61
|
+
blurEdges={true}
|
|
62
|
+
pauseOnHover={true}
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
{/* Horizontal Multi-Row Scrolling */}
|
|
66
|
+
<ImageScroll
|
|
67
|
+
direction="horizontal"
|
|
68
|
+
rows={3}
|
|
69
|
+
speed={1.2}
|
|
70
|
+
blurEdges={true}
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### Custom Images
|
|
78
|
+
```jsx
|
|
79
|
+
const myImages = [
|
|
80
|
+
{ id: 1, src: "https://example.com/art1.jpg", title: "Artwork 1", category: "DESIGN", accent: "#6366f1" },
|
|
81
|
+
{ id: 2, src: "https://example.com/art2.jpg", title: "Artwork 2", category: "CYBER", accent: "#ec4899" },
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
<ImageScroll images={myImages} columns={3} />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### 2. InteractiveAsciiFace
|
|
90
|
+
|
|
91
|
+
Interactive ASCII art portrait generator. Dynamically samples image luminance to render animated matrix-style digital rain that responds smoothly to pointer movements.
|
|
92
|
+
|
|
93
|
+
```jsx
|
|
94
|
+
import { InteractiveAsciiFace } from "adaptive-ui-react";
|
|
95
|
+
|
|
96
|
+
export default function AsciiDemo() {
|
|
97
|
+
return (
|
|
98
|
+
<div className="h-[600px] w-full">
|
|
99
|
+
<InteractiveAsciiFace
|
|
100
|
+
src="/path/to/portrait.png"
|
|
101
|
+
color="#60ed83"
|
|
102
|
+
followPointer={true}
|
|
103
|
+
lineSpeed={1}
|
|
104
|
+
imageClarity={1.35}
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### 3. BlobMorphHero
|
|
114
|
+
|
|
115
|
+
A high-tech hero banner combining marching-squares topographic contour lines, organic metaball simulations, dynamic HUD wireframes, and progressive image reveals.
|
|
116
|
+
|
|
117
|
+
```jsx
|
|
118
|
+
import { BlobMorphHero } from "adaptive-ui-react";
|
|
119
|
+
|
|
120
|
+
export default function HeroSection() {
|
|
121
|
+
return (
|
|
122
|
+
<div className="h-[650px] w-full">
|
|
123
|
+
<BlobMorphHero
|
|
124
|
+
preset="lando-f1"
|
|
125
|
+
blobMode="roam"
|
|
126
|
+
speed={1.0}
|
|
127
|
+
showTopography={true}
|
|
128
|
+
showAmbientBlobs={true}
|
|
129
|
+
showHud={true}
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
You can pass custom base and overlay images:
|
|
137
|
+
```jsx
|
|
138
|
+
<BlobMorphHero
|
|
139
|
+
baseImage="/images/character-base.png"
|
|
140
|
+
equippedImage="/images/character-armor.png"
|
|
141
|
+
accentColor="#22d3ee"
|
|
142
|
+
/>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### 4. InfiniteTunnelHero
|
|
148
|
+
|
|
149
|
+
Retro-futuristic 3D perspective infinite tunnel animation driven by GSAP, featuring responsive neon perspective slabs and floating starry particles.
|
|
150
|
+
|
|
151
|
+
```jsx
|
|
152
|
+
import { InfiniteTunnelHero } from "adaptive-ui-react";
|
|
153
|
+
|
|
154
|
+
export default function TunnelDemo() {
|
|
155
|
+
return (
|
|
156
|
+
<InfiniteTunnelHero color="#FF52EF" backgroundColor="#1F0038" speed={1}>
|
|
157
|
+
<div className="text-center text-white">
|
|
158
|
+
<h1 className="text-5xl font-black tracking-tight">ADAPTIVE UI</h1>
|
|
159
|
+
<p className="mt-2 text-zinc-300">Infinite Neon Grid Tunnel</p>
|
|
160
|
+
</div>
|
|
161
|
+
</InfiniteTunnelHero>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### 5. SmoothScrollProvider
|
|
169
|
+
|
|
170
|
+
A universal Lenis smooth-scrolling provider that recalculates bounds dynamically and handles route changes seamlessly across Next.js and pure React apps.
|
|
171
|
+
|
|
172
|
+
```jsx
|
|
173
|
+
// Next.js App Router (app/layout.jsx)
|
|
174
|
+
import { SmoothScrollProvider } from "adaptive-ui-react";
|
|
175
|
+
|
|
176
|
+
export default function RootLayout({ children }) {
|
|
177
|
+
return (
|
|
178
|
+
<html lang="en">
|
|
179
|
+
<body>
|
|
180
|
+
<SmoothScrollProvider>
|
|
181
|
+
{children}
|
|
182
|
+
</SmoothScrollProvider>
|
|
183
|
+
</body>
|
|
184
|
+
</html>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Compatibility
|
|
192
|
+
|
|
193
|
+
- **React**: React 18 & React 19
|
|
194
|
+
- **Next.js**: Next.js 14, 15, and 16 (App Router & Pages Router)
|
|
195
|
+
- **Vite / SPA**: Full compatibility with Vite, Create React App, Remix, and Astro
|
|
196
|
+
- **TypeScript**: First-class TypeScript declarations included (`index.d.ts`)
|
|
197
|
+
- **Server Components (RSC)**: All interactive components include `"use client"` directives
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
MIT © Adaptive UI
|