BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/domain-ui/responsive-resizable-preview

responsive-resizable-preview

domain-ui/responsive-resizable-preview
FreeComponent

domain-ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/teurons/domain-ui/main/apps/web/public/r/responsive-resizable-preview.json

Source

components/domain-ui/responsive-resizable-preview/index.tsxraw.githubusercontent.com/teurons/domain-ui/main/apps/web/public/r/responsive-resizable-preview.json · first 6 KB
1"use client";
2import { useState, useEffect, useRef, useMemo } from "react";
3import type { ImperativePanelHandle } from "react-resizable-panels";
4import {
5 ResizableHandle,
6 ResizablePanel,
7 ResizablePanelGroup,
8} from "@/components/ui/resizable";
9import { defaultBreakpoints, getBreakpoint } from "./breakpoints";
10import type { Breakpoint, BreakpointConfig } from "./breakpoints";
11import { Toolbar, ScaleBar, Settings } from "./settings";
12import { cn } from "@/lib/utils";
13
14// Types
15export interface PreviewConfig {
16 darkMode?: boolean;
17 showToolbar?: boolean;
18 showScale?: boolean;
19 showLabels?: boolean;
20}
21
22interface BasePreviewProps {
23 className?: string;
24 breakpoints?: BreakpointConfig[];
25 config?: PreviewConfig;
26}
27
28interface ResponsiveResizablePreviewProps extends BasePreviewProps {
29 children?: React.ReactNode;
30}
31
32interface RRChildPreviewProps extends BasePreviewProps {
33 children?: React.ReactNode;
34}
35
36interface RRIFramePreviewProps extends BasePreviewProps {
37 srcUrl: string;
38 height?: number;
39}
40
41const defaultConfig = {
42 darkMode: false,
43 showToolbar: true,
44 showScale: true,
45 showLabels: true,
46};
47
48// PreviewPanel component - the core resizable container
49interface PreviewPanelProps {
50 children: React.ReactNode;
51 className?: string;
52 panelRef: React.RefObject<ImperativePanelHandle | null>;
53 contentRef: React.RefObject<HTMLDivElement | null>;
54}
55
56function PreviewPanel({
57 children,
58 className,
59 panelRef,
60 contentRef,
61}: PreviewPanelProps) {
62 const [isHandleResizing, setIsHandleResizing] = useState(false);
63
64 const bgPattern = `url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.2' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E")`;
65
66 return (
67 <ResizablePanelGroup
68 direction="horizontal"
69 className="!overflow-visible relative z-5 border-0 border-[#0000001f] bg-gray-300 bg-clip-padding dark:bg-gray-600"
70 style={{ backgroundImage: bgPattern }}
71 >
72 <ResizablePanel
73 ref={panelRef}
74 className={cn(
75 `border ${className}`,
76 !isHandleResizing && "transition-all duration-200 ease-in-out"
77 )}
78 defaultSize={100}
79 minSize={20}
80 >
81 <div ref={contentRef} className="@container">{children}</div>
82 </ResizablePanel>
83 <ResizableHandle
84 withHandle
85 className="z-50 w-0"
86 onDragging={(e) => setIsHandleResizing(e)}
87// … truncated

What it pulls in

Other registry items

  • button
  • badge
  • resizable

Files it writes

  • components/domain-ui/responsive-resizable-preview/index.tsx
  • components/domain-ui/responsive-resizable-preview/breakpoints.ts
  • components/domain-ui/responsive-resizable-preview/settings.tsx

Facts

Registry
domain-ui
Type
registry:component
Access
Free
Files written
3
Licence
the repository states none
In the index
at or before 2026-08-11
Last confirmed
yesterday

Go to the source

domain-ui.dev teurons/domain-ui on GitHub Raw registry item This item as JSON

More from domain-ui

All 16 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
pan-inputpan-inputdomain-uiComponentsFreeno deps
pan-input-incrementalpan-input-incrementaldomain-uiComponentsFreeno deps
passport-inputpassport-inputdomain-uiComponentsFreeno deps
passport-input-incrementalpassport-input-incrementaldomain-uiComponentsFreeno deps
phone-inputphone-inputdomain-uiComponentsFree2 deps
portfolio-chartportfolio-chartdomain-uiComponentsFreeno deps
regex-inputregex-inputdomain-uiComponentsFreeno deps · 2 files
regex-input-incrementalregex-input-incrementaldomain-uiComponentsFreeno deps · 5 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex