ChatReactionIcons#
A widget to display reaction icons that can be clicked on.
Use pn.ui.ChatReactionIcons to create this component.
API#
.. py:class:: ChatReactionIcons(*, active_icons, default_layout, options, disabled, loading, align, aspect_ratio, css_classes, design, height, height_policy, margin, max_height, max_width, min_height, min_width, sizing_mode, styles, stylesheets, tags, visible, width, width_policy, label, value, name) :module: panel.chat.icon
A widget to display reaction icons that can be clicked on.
:Parameters:
**value** : List
The selected reactions.
**options** : Dict
A key-value pair of reaction values and their corresponding tabler icon names
found on https://tabler.io/icons.
**active_icons** : Dict
The mapping of reactions to their corresponding active icon names;
if not set, the active icon name will default to its "filled" version.
**Reference: https://panel.holoviz.org/reference/chat/ChatReactionIcons.html**
..
**:Example:**
..
**>>> ChatReactionIcons(value=["like"], options={"like": "thumb-up", "dislike": "thumb-down"})**
..
.. rubric:: Methods
.. autosummary::
default_layout
.. !! processed by numpydoc !!
Parameter Definitions
Parameters inherited from:
:class:`panel.widgets.base.WidgetBase`: label
:class:`panel.viewable.Layoutable`: align, aspect_ratio, design, min_width, min_height, max_width, max_height, styles, stylesheets, tags, width_policy, height_policy, sizing_mode, visible
:class:`panel.viewable.Viewable`: loading
:class:`panel.widgets.base.Widget`: height, width, disabled
value = List(bounds=(0, None), default=[], label='Value')
The active reactions.
css_classes = List(allow_refs=True, bounds=(0, None), default=['reaction-icons'], item_type=<class 'str'>, label='Css classes', nested_refs=True)
The CSS classes of the widget.
margin = Margin(allow_None=True, allow_refs=True, default=0, label='Margin')
Allows to create additional space around the component. May
be specified as a two-tuple of the form (vertical, horizontal)
or a four-tuple (top, right, bottom, left).
active_icons = Dict(class_=<class 'dict'>, default={}, label='Active icons')
The mapping of reactions to their corresponding active icon names.
If not set, the active icon name will default to its "filled" version.
options = Dict(class_=<class 'dict'>, default={'favorite': 'heart'}, label='Options')
A key-value pair of reaction values and their corresponding tabler icon names
found on https://tabler.io/icons.
default_layout = ClassSelector(class_=<class 'panel.layout.base.Panel'>, default=<class 'panel.layout.base.Column'>, label='Default layout')
The layout to use for the icons. Defaults to Column, which stacks the icons vertically.
.. py:attribute:: ChatReactionIcons.default_layout :module: panel.chat.icon
alias of :py:class:`~panel.layout.base.Column`