Code Monkey home page Code Monkey logo

Comments (8)

bvaughn avatar bvaughn commented on June 8, 2024 1

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.

nickdc8 avatar nickdc8 commented on June 8, 2024

Add some styling to them.
<PanelResizeHandle className="w-2 bg-blue-800" />

from react-resizable-panels.

MVARUNREDDY8203 avatar MVARUNREDDY8203 commented on June 8, 2024

still doesnt work
image
image

from react-resizable-panels.

bvaughn avatar bvaughn commented on June 8, 2024

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.

MVARUNREDDY8203 avatar MVARUNREDDY8203 commented on June 8, 2024

https://github.com/MVARUNREDDY8203/test_resizable_panels heres the url of github repo of my local project

from react-resizable-panels.

bvaughn avatar bvaughn commented on June 8, 2024

@MVARUNREDDY8203 The problem is that you haven't given any meaningful CSS styles to your resize handles, so they're effectively invisible.
Screenshot 2023-12-29 at 9 51 22 AM

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.

MVARUNREDDY8203 avatar MVARUNREDDY8203 commented on June 8, 2024

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.

MVARUNREDDY8203 avatar MVARUNREDDY8203 commented on June 8, 2024

Its working now, thanks for the quick resolve @bvaughn

from react-resizable-panels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.