You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,16 @@
2
2
3
3
# react-driftkit
4
4
5
-
**Small, focused building blocks for floating UI in React.**
6
-
Tree-shakable, unstyled, one component per job.
5
+
**A tree-shakable React component library for floating UI: draggable widgets, an edge-pinned dock, a draggable bottom sheet, an N-pane resizable split pane, an image magnifier (zoom lens), and a peek-and-flick card stack.**
6
+
7
+
Unstyled, TypeScript-first, zero dependencies, React 18 & React 19.
@@ -26,12 +27,12 @@ Building a chat widget, floating toolbar, debug panel, or side dock? You want th
26
27
27
28
| Component | What it does |
28
29
|-----------|--------------|
29
-
|[`<MovableLauncher>`](#movablelauncher)|A draggable floating wrapper that pins to any viewport corner or lives at custom `{x, y}` — drop-anywhere with optional snap-on-release. |
30
-
|[`<SnapDock>`](#snapdock)|An edge-pinned dock that slides along any side of the viewport and flips orientation automatically between horizontal and vertical. |
31
-
|[`<DraggableSheet>`](#draggablesheet)|A pull-up / pull-down sheet pinned to an edge with named snap points (`peek`, `half`, `full`) or arbitrary pixel / percentage stops. |
32
-
|[`<ResizableSplitPane>`](#resizablesplitter)|An N-pane resizable split layout with draggable handles, min/max constraints, and localStorage-persisted ratios. |
33
-
|[`<ZoomLens>`](#zoomlens)|A draggable magnifier circle that zooms into whatever it hovers — free-drag over the whole page or scope it to one element (product-image-zoom style). Wheel to zoom, hotkey or Escape to dismiss. |
34
-
|[`<FlickDeck>`](#flickdeck)|A stack of cards where each back card peeks from one edge. Click the peek to flick that card to the front, or optionally swipe the front card off to dismiss it. |
30
+
|[`<MovableLauncher>`](#movablelauncher)|**React draggable floating widget** — pin a chat bubble, AI assistant, debug panel, or toolbar to any viewport corner with snap-on-release. |
31
+
|[`<SnapDock>`](#snapdock)|**React floating dock / edge-pinned toolbar** — slides along any side of the viewport and flips orientation between horizontal and vertical. |
|[`<ResizableSplitPane>`](#resizablesplitter)|**React resizable split pane** — N-pane IDE-style layout with draggable handles, min/max constraints, and localStorage-persisted ratios. |
34
+
|[`<ZoomLens>`](#zoomlens)|**React image magnifier / zoom lens**— free-drag over the whole page or scope to one element (product-image zoom). Wheel to zoom, Escape to dismiss. |
35
+
|[`<FlickDeck>`](#flickdeck)|**React card stack & swipeable cards** — back cards peek from one edge, click the peek to flick it forward; optional swipe-to-dismiss. |
35
36
36
37
## Installation
37
38
@@ -286,6 +287,20 @@ import FlickDeck from 'react-driftkit/FlickDeck';
286
287
-**Tip / onboarding stacks** — a deck of coachmark cards the user can flick through and swipe off one by one
287
288
-**Comparison decks** — toggle between product plans, chart variants, or before/after states with a single click on the peek
288
289
290
+
## Looking for…
291
+
292
+
If you're searching for any of these, react-driftkit has a primitive for it:
Each one is independently importable, ships unstyled, and works with React 18 and React 19.
303
+
289
304
## How it works
290
305
291
306
Under the hood all components use the [Pointer Events API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) for universal input handling. `MovableLauncher`, `SnapDock`, and `DraggableSheet` render as `position: fixed` elements at the top of the z-index stack (`2147483647`) and use a `ResizeObserver` to stay pinned when their content changes size.
@@ -303,8 +318,8 @@ Under the hood all components use the [Pointer Events API](https://developer.moz
303
318
Contributions are welcome. Open an issue or send a pull request.
'An edge-pinned dock that slides along any side of the viewport and flips orientation automatically between horizontal and vertical layouts.',
79
79
metaDescription:
80
-
'SnapDock — an edge-pinned React dock that snaps to left, right, top, or bottom. Horizontal/vertical layout flip, drag offset, unstyled primitive for React 18 and 19.',
80
+
'SnapDock is a React floating dock / sidebar component — edge-pinned to left, right, top, or bottom of the viewport with automatic orientation flip between horizontal and vertical. Tree-shakable, unstyled, TypeScript-first, React 18 & React 19.',
81
+
seoDescriptor: 'React Floating Dock & Edge-Pinned Toolbar',
'A stack of cards where each back card peeks from one edge — receding into depth for top/bottom peek, fanning out at an angle for left/right. Click the peek to flick that card to the front, or optionally swipe the front card off to dismiss it. Useful for toggles between views, tip stacks, and side-by-side comparisons.',
115
115
metaDescription:
116
-
'FlickDeck — a stacked card component for React. Back cards peek from a configurable edge, click the peek to flick it forward with a smooth transition, optional swipe-to-dismiss. Controlled or uncontrolled, unstyled, zero runtime deps.',
116
+
'FlickDeck is a React card stack & swipeable cards component — back cards peek from a configurable edge, click the peek to flick it forward, optional swipe-to-dismiss. Useful for tip stacks, view toggles, side-by-side comparisons, and onboarding flows. React 18 & React 19.',
{prop: 'frontId',typeHtml: '<code>string</code>',defaultHtml: '—',descriptionHtml: "Controlled id of the front card — matches a child's React <code>key</code>. Omit for uncontrolled."},
119
122
{prop: 'defaultFrontId',typeHtml: '<code>string</code>',defaultHtml: '—',descriptionHtml: "Uncontrolled initial front card id. Falls back to the first child's key if unset."},
'A draggable floating wrapper that lets users pick up any widget and drop it anywhere on the viewport — or snap it to the nearest corner on release.',
89
89
metaDescription:
90
-
'MovableLauncher — a tree-shakable draggable floating wrapper for React. Corner snapping, free positioning, pointer-event based, unstyled, TypeScript-first, React 18 and 19.',
90
+
'MovableLauncher is a React draggable floating widget component — pin a chat bubble, AI assistant, debug panel, or toolbar to any viewport corner with snap-on-release. Tree-shakable, unstyled, TypeScript-first, React 18 & React 19.',
'A pull-up / pull-down sheet pinned to an edge with snap points like peek, half, and full. Great for mobile-style details, filters, or cart drawers.',
98
98
metaDescription:
99
-
'DraggableSheet — an edge-pinned React sheet with named and custom snap points, velocity-aware release, and a drag-handle selector. Unstyled, TypeScript-first, React 18 and 19.',
99
+
'DraggableSheet is a React bottom sheet & pull-up drawer component — peek, half, and full snap points, velocity-aware release, drag-handle selector. Mobile-style filters, cart drawers, and detail panels. Unstyled, TypeScript-first, React 18 & React 19.',
'An N-pane split view with draggable handles and a single render prop for custom handle UI. Supports min/max constraints, persisted sizes, and both horizontal and vertical layouts.',
124
124
metaDescription:
125
-
'ResizableSplitPane — an N-pane resizable split layout for React with draggable handles, min/max constraints, localStorage persistence, and controlled/uncontrolled modes.',
125
+
'ResizableSplitPane is a React resizable split pane component for IDE-style layouts — N panes, draggable handles, min/max constraints, localStorage-persisted ratios, horizontal & vertical orientations. Tree-shakable, unstyled, TypeScript-first, React 18 & React 19.',
'A draggable magnifier circle that zooms into whatever it hovers. Great for design review, image inspection, or dense data tables. Drag to move, scroll to zoom, Escape or a hotkey to exit.',
133
133
metaDescription:
134
-
'ZoomLens — a draggable magnifier circle for React. Live-clones the page into a circular lens, drag to reposition, scroll to change zoom, Escape or hotkey to dismiss. Tree-shakable, unstyled, zero runtime deps.',
134
+
'ZoomLens is a React image magnifier & zoom-lens component — draggable magnifier circle for product images, design review, dense data tables, or map inspection. Free-drag or scope to a single element (product zoom). Wheel to zoom, Escape to dismiss. React 18 & React 19.',
0 commit comments