Skip to main content

modal

from dara.components.common.modal import Modal

class Modal(LayoutComponent)

Modal

The modal component accepts a set of children and renders them within a modal depending on the value of the show flag.

A simple modal component can be rendered like:


from dara.core import Variable
from dara.components.common import Modal, Text

show=Variable(True)

Modal(
Text('Test Text'),
show=show
)

Arguments:

  • show: Boolean Variable instance recording the state, if True it renders the model and it's children
  • justify: How to justify the content of the modal, accepts any flexbox justifications
  • align: How to align the content of the modal, accepts any flexbox alignments

Attributes

  • show: NonDataVariable