question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow an option to resize a modal

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

Allow the user to resize his modal can help having the perfect size the user wants. If you have a complex modal, having a certain calculated width and height helps, but in some case, the user doesn’t have a good UX because the height or width can be too big (creating scrollbars) or too small, making the modal unusable.

What does the proposed API look like?

I know that the modalRender option where you can customize the render method. Inside you can put a Draggable element to make the modal draggable. I don’t know if it could make sense to create a Resizable element to allow the user to resize as well. Same concept as the Draggable. But combining both Draggable and Resizable could be a bad design. It could be an option in the modal: resize and the values could be horizontal, vertical and both.

Example from Boostrap

capture

API

var $modal = $('#myModal');
$modal.find('.modal-content')
  .css({
    width: 625,
    height: 175,
  })
  .resizable({
    minWidth: 625,
    minHeight: 175,
    handles: 'n, e, s, w, ne, sw, se, nw',
  })
  .draggable({
    handle: '.modal-header'
  });

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
chkaoscommented, Jun 30, 2022
0reactions
abenhamdinecommented, May 25, 2022

see also https://github.com/DylanVann/ant-design-draggable-modal
it implements resizability

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resize Twitter Bootstrap modal dynamically based on ...
Change the content dynamically in the fiddle, you will see the modal ... You can also allow the users to control the size...
Read more >
How to Change the Default Width of Bootstrap Modal Box
Answer: Set width for .modal-dialog element ... By default, Bootstrap modal are available in four different sizes — small, default, large and extra-large....
Read more >
How to auto resize modal dialog when content change - Drupal
I am opening a form in modal dialog using a link as follows: Contact Dialog is opening fine, displaying the form element.
Read more >
How to change Bootstrap Modal Width and Height - 3 Examples
In this example, the jQuery code is used for creating a modal with min/max options. As minimize icon is clicked, the modal will...
Read more >
Modal - Bootstrap
Before getting started with Bootstrap's modal component, be sure to read the following as our menu options have recently changed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found