Comments (8)
This looks like a common enough problem that I added a section about it to the FAQ:
https://github.com/bvaughn/react-resizable-panels?tab=readme-ov-file#why-dont-i-see-any-resize-ui
from react-resizable-panels.
Add some styling to them.
<PanelResizeHandle className="w-2 bg-blue-800" />
from react-resizable-panels.
from react-resizable-panels.
Give me a link to something I can run in my browser, or a Git repo I can check out and run locally. It is inefficient to try to trouble shoot issues by looking at pictures of code.
from react-resizable-panels.
https://github.com/MVARUNREDDY8203/test_resizable_panels heres the url of github repo of my local project
from react-resizable-panels.
@MVARUNREDDY8203 The problem is that you haven't given any meaningful CSS styles to your resize handles, so they're effectively invisible.
Adding Tailwind classes to them (w-2 bg-blue-800
) doesn't do much if you aren't including Tailwind in your project (which it seems you aren't, because no Tailwind styles are applied anywhere so far as I can see). If I apply manual styles to your components, they "work"
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 13b7588..66809d0 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -2,17 +2,23 @@
import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
export default function Home() {
- return (
- <PanelGroup direction='horizontal'>
- <Panel defaultSize={30} minSize={20}>
- <div>Hi</div>
- </Panel>
- <PanelResizeHandle className='w-2 bg-blue-800' />
- <Panel minSize={30}>middle</Panel>
- <PanelResizeHandle className='w-2 bg-blue-800' />
- <Panel defaultSize={30} minSize={20}>
- <div>hi right</div>
- </Panel>
- </PanelGroup>
- );
+ return (
+ <PanelGroup direction="horizontal" style={{ height: 400 }}>
+ <Panel defaultSize={30} minSize={20}>
+ <div>Hi</div>
+ </Panel>
+ <PanelResizeHandle
+ className="w-2 bg-blue-800"
+ style={{ width: 5, backgroundColor: "red" }}
+ />
+ <Panel minSize={30}>middle</Panel>
+ <PanelResizeHandle
+ className="w-2 bg-blue-800"
+ style={{ width: 5, backgroundColor: "red" }}
+ />
+ <Panel defaultSize={30} minSize={20}>
+ <div>hi right</div>
+ </Panel>
+ </PanelGroup>
+ );
}
This seems like a project configuration issue.
from react-resizable-panels.
I would have loved a how to get started section with this specified. I can help create that.
It just makes it easier for beginners to get started..
from react-resizable-panels.
Its working now, thanks for the quick resolve @bvaughn
from react-resizable-panels.
Related Issues (20)
- Panel doesn't respect minSizePixels when resizing window HOT 2
- Reversed Drag Direction🔄 HOT 4
- Assertion failed error HOT 12
- Missing support for persistence of collapsed panels HOT 3
- Problem with components rerendering between panels HOT 8
- collapsedSize with variable breaks onCollapse function HOT 2
- isCollapsed function doesn't handle undefined collapsedSize prop HOT 1
- Assertion Failed HOT 7
- Layout shift with latest version while pre-rendered on the server side HOT 16
- Missing changelogs for 1.0.0+? HOT 1
- make resize handle accept ref HOT 4
- `onCollapse` doesn't work. HOT 2
- onCollapse type issue HOT 3
- No Tooltip animation using manual installation method HOT 2
- Feature Request: Access underlying DOM elements via Imperative API HOT 3
- Bug (ish): `tagName: ElementType` is too wide HOT 4
- Type error when I build with resizable HOT 3
- Could I costomer localStorage key completely? HOT 6
- Having trouble with onCollapse HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-resizable-panels.