dash_mp_components.ModalContextProvider¶
- class dash_mp_components.ModalContextProvider(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, id: str | dict | None = None, active: bool | None = None, forceAction: bool | None = None, isDrawer: bool | None = None, **kwargs)[source]¶
Bases:
ComponentA ModalContextProvider component. Use ModalContextProvider to coordinate modal trigger and modal content
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional):
Children will be rendered within the ModalContext. Should contain at least a ModalTrigger component and a Modal component.
- id (string; optional):
The ID used to identify this component in Dash callbacks.
- active (boolean; optional):
The current or default state of the modal. If True, the “is-active” class is added to <Modal/>. This value can be watched and changed from outside the component (e.g. via dash callback).
- forceAction (boolean; optional):
Prevent modal from being closed without completion of a specific action. If set, there must be a button within the modal that updates the “active” state using the ModalContext or a dash callback on the active prop.
isDrawer (boolean; optional)
- __init__(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, id: str | dict | None = None, active: bool | None = None, forceAction: bool | None = None, isDrawer: bool | None = None, **kwargs)¶
Methods
__init__([children, id, active, ...])to_plotly_json()Attributes
REQUIREDUNDEFINEDavailable_wildcard_properties