divider.py 706 B

12345678910111213141516171819
  1. """A line to divide parts of the layout."""
  2. from typing import Literal, Optional
  3. from reflex.components.chakra import ChakraComponent, LiteralDividerVariant
  4. from reflex.vars import Var
  5. LiteralLayout = Literal["horizontal", "vertical"]
  6. class Divider(ChakraComponent):
  7. """Dividers are used to visually separate content in a list or group."""
  8. tag: str = "Divider"
  9. # Pass the orientation prop and set it to either horizontal or vertical. If the vertical orientation is used, make sure that the parent element is assigned a height.
  10. orientation: Optional[Var[LiteralLayout]] = None
  11. # Variant of the divider ("solid" | "dashed")
  12. variant: Optional[Var[LiteralDividerVariant]] = None