link.py 504 B

1234567891011121314151617181920
  1. """A link component."""
  2. from reflex.components.component import Component
  3. from reflex.vars.base import Var
  4. class NextLink(Component):
  5. """Links are accessible elements used primarily for navigation. This component is styled to resemble a hyperlink and semantically renders an <a>."""
  6. library = "next/link"
  7. tag = "NextLink"
  8. is_default = True
  9. # The page to link to.
  10. href: Var[str]
  11. # Whether to pass the href prop to the child.
  12. pass_href: Var[bool] = Var.create(True)