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.

Request for Modal component to accept Top

See original GitHub issue

Is your feature request related to a problem? Please describe. The modal top is hard coded at the moment, and the only alternative is to pass isCentered. It’d be nice to have finer grain control over where the modal shows up on the screen. In our app, this hardcoded number puts the modal directly inline with the header and it looks kind of funny. It’d be nice to be able to change it.

Describe the solution you’d like Be able to pass the top prop to the Modal component so we can adjust where the modal shows up.

Describe alternatives you’ve considered Another thing I thought is a prop that is something like positionOnScreen that can put it at 0%, 25%, 50%, 75%, or 100%.

I’d be happy to do the work on this. I’m curious about the maintainer opinions before starting.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
GraemeFultoncommented, May 1, 2021

using marginTop="0" on ModalContent worked for me 🤔 with scroll set to inside

0reactions
nomadodacommented, Mar 17, 2022

But how can i place at bottom ? i want my modal to be a bottom when user open website in mobile

Use alignSelf="flex-end" on ModalContent

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Implement a Modal Component in React - DigitalOcean
Build a modal component in your React project using props and state to control displaying and closing.
Read more >
Top React modal components for 2021 - LogRocket Blog
Take a look at some of the best modal components out there in the React community that can help you build better user...
Read more >
Bring View on top of Modal using zIndex style with React-Native
The Modal component is a native view that sits on top of the rest of your react-native application. The only way to put...
Read more >
How to Open and Close a React-Bootstrap Modal ... - Pluralsight
Import Components from React Bootstrap ... The first step is to import all the relevant components from the react-bootstrap library. You will ...
Read more >
React Modal component - Material UI - MUI
The modal component provides a solid foundation for creating dialogs, popovers, lightboxes, or whatever else.
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