Skip to content

A Modal that works with Panel in both server and notebook environments.

Notifications You must be signed in to change notification settings

awesome-panel/panel-modal

Repository files navigation

✨ panel-modal

We want to make it easy to use modals with Panel on both the server and in the notebook.

A modal is an element that displays in front of and deactivates all other page content. Panel already includes a modal. But it only works if you using a template on a server. It does not work in the notebook.

You can install and use the package as simple as.

pip install panel-modal
import panel as pn

from panel_modal import Modal

pn.extension("modal")

modal = Modal(pn.panel("Hi. I am the Panel Modal!", width=200))

pn.Column(modal.param.open, modal).servable()

Panel Modal in Notebook

Check out the api section below and the examples folder for more details.

Project Intro

Api

Parameters

  • objects : The objects to display in the modal. You can define the size of the modal if you wrap the objects in a layout like a Column.
  • is_open: Whether or not the modal is open. Set this to True to open the modal.
  • show_close_button: Whether to show a close button in the modal.
  • style: The css styles applied to the modal.

Events

  • open: Trigger this to open the modal.
  • close: Trigger this to close the modal.

🚀 Get started in under a minute

Install panel-modal including the examples dependencies.

pip install  panel-modal[examples]

Explore the sample apps

pn hello panel-modal

You can now find the reference and gallery notebooks in the examples/awesome-panel/panel-modal folder. Check them out by running jupyter lab.

📒 Explore the examples online

Click one of the buttons

nbviewer Binder

⭐ Support

Please support Panel and awesome-panel by giving the projects a star on Github:

Thanks

❤️ Contribute

If you are looking to contribute to this project you can find ideas in the issue tracker. To get started check out the DEVELOPER_GUIDE.

I would love to support and receive your contributions. Thanks.

Hacktober Fest.

Monitor

PyPI version Downloads Python Versions License Test Results

About

A Modal that works with Panel in both server and notebook environments.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published