panel.layout.float module#

class panel.layout.float.FloatPanel(*objects, name='', **params)[source]#

Bases: ListLike, ReactiveHTML

Float provides a floating panel layout.

Reference: https://panel.holoviz.org/reference/layouts/FloatPanel.html

Example:

>>> import panel as pn
>>> pn.extension("floatpanel")
>>> pn.layout.FloatPanel("**I can float**!", position="center", width=300).servable()

Methods

select([selector])

Iterates over the Viewable and any potential children in the applying the Selector.

Parameter Definitions


Parameters inherited from:

panel.viewable.Layoutable: align, aspect_ratio, css_classes, design, height, min_width, min_height, max_width, max_height, margin, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visible

panel.viewable.Viewable: loading

panel.layout.base.ListLike: objects

config = Dict(class_=<class 'dict'>, default={}, label='Config')

Additional jsPanel configuration with precedence over parameter values.

contained = Boolean(default=True, label='Contained')

Whether the component is contained within parent container or completely free floating.

position = Selector(default='right-top', label='Position', names={}, objects=['center', 'left-top', 'center-top', 'right-top', 'right-center', 'right-bottom', 'center-bottom', 'left-bottom', 'left-center'])

The initial position if the container is free-floating.

offsetx = Integer(allow_None=True, bounds=(0, None), inclusive_bounds=(True, True), label='Offsetx')

Horizontal offset in pixels.

offsety = Integer(allow_None=True, bounds=(0, None), inclusive_bounds=(True, True), label='Offsety')

Vertical offset in pixels.

theme = String(default='primary', label='Theme')

The theme which can be one of: - Built-ins: ‘default’, ‘primary’, ‘secondary’, ‘info’, ‘success’, ‘warning’, ‘danger’, ‘light’, ‘dark’ and ‘none’ - HEX, RGB and HSL color values like ‘#123456’ Any standardized color name like ‘forestgreen’ and color names from the Material Design Color System like ‘purple900’ - Additionally a theme string may include one of the modifiers ‘filled’, ‘filledlight’, ‘filleddark’ or ‘fillcolor’ separated from the theme color by a space like ‘primary

status = Selector(default='normalized', label='Status', names={}, objects=['normalized', 'maximized', 'minimized', 'smallified', 'smallifiedmax', 'closed'])

The current status of the panel.

select(selector=None)[source]#

Iterates over the Viewable and any potential children in the applying the Selector.

Parameters:
selector: type or callable or None

The selector allows selecting a subset of Viewables by declaring a type or callable function to filter by.

Returns:
viewables: list(Viewable)