linkoverlay.py 583 B

1234567891011121314151617181920212223
  1. """Link overlay components."""
  2. from typing import Optional
  3. from reflex.components.chakra import ChakraComponent
  4. from reflex.vars import Var
  5. class LinkOverlay(ChakraComponent):
  6. """Wraps child component in a link."""
  7. tag = "LinkOverlay"
  8. # If true, the link will open in new tab
  9. is_external: Optional[Var[bool]] = None
  10. # Href of the link overlay.
  11. href: Optional[Var[str]] = None
  12. class LinkBox(ChakraComponent):
  13. """The LinkBox lifts any nested links to the top using z-index to ensure proper keyboard navigation between links."""
  14. tag = "LinkBox"