Skip to content

Fill height of sidecar with HTML widget #113

@banesullivan-kobold

Description

@banesullivan-kobold

Is it possible to fill the full height of the Sidecar output with any arbitrary ipywidget? I noticed ipyleaflet is handled incredibly well -- having a reasonable min-height in a standard cell output but filling the full Sidecar height

from IPython.display import display, IFrame
from sidecar import Sidecar
from ipywidgets.widgets import HTML

Sidecar.close_all()

with Sidecar(title="IFrame"):
    display(IFrame("https://www.jupyter.org/", "100%", "100%"))

with Sidecar(title="HTML"):
    display(HTML('<iframe src="https://www.jupyter.org/" style="width: 100%; height: 100%;"></iframe>'))
IFrame HTML
Screenshot 2024-09-05 at 4 11 11 PM Screenshot 2024-09-05 at 4 11 15 PM

Why? I'm trying to render other widget types like PyVista's (which is an HTML widget under the hood) or arbitrary Panel panes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions