other.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. """Other classes."""
  2. from reflex.vars.base import Var
  3. from .base import BaseHTML
  4. class Details(BaseHTML):
  5. """Display the details element."""
  6. tag = "details"
  7. # Indicates whether the details will be visible (expanded) to the user
  8. open: Var[bool]
  9. class Dialog(BaseHTML):
  10. """Display the dialog element."""
  11. tag = "dialog"
  12. # Indicates whether the dialog is active and can be interacted with
  13. open: Var[bool]
  14. class Summary(BaseHTML):
  15. """Display the summary element.
  16. Used as a summary or caption for a <details> element.
  17. """
  18. tag = "summary"
  19. class Slot(BaseHTML):
  20. """Display the slot element.
  21. Used as a placeholder inside a web component.
  22. """
  23. tag = "slot"
  24. class Template(BaseHTML):
  25. """Display the template element.
  26. Used for declaring fragments of HTML that can be cloned and inserted in the document.
  27. """
  28. tag = "template"
  29. class Math(BaseHTML):
  30. """Display the math element.
  31. Represents a mathematical expression.
  32. """
  33. tag = "math"
  34. class Html(BaseHTML):
  35. """Display the html element."""
  36. tag = "html"
  37. # Specifies the URL of the document's cache manifest (obsolete in HTML5)
  38. manifest: Var[str]
  39. details = Details.create
  40. dialog = Dialog.create
  41. summary = Summary.create
  42. slot = Slot.create
  43. template = Template.create
  44. math = Math.create
  45. html = Html.create