Link
Render an Astryx text link.
Astryx Props
JSON-safe Link props forwarded to Astryx.
Supported Astryx props include:
as(LinkComponentType): Custom component to render instead of an anchor when href is provided.label(string): Accessible label when the visible content is not self-descriptive.href(string): Link destination. When omitted, Astryx renders a button styled as a link.hasUnderline(boolean; default false): Always shows underline; otherwise underline appears on hover.isDisabled(boolean; default false): Disables the link.isExternalLink(boolean; default false): Opens in a new tab, adds an external icon, and sets safe target/rel defaults.newTabLabel(string; default '(opens in new tab)'): Screen-reader text appended to external links.target(string): Where to open the linked document; overridden to _blank when isExternalLink is true.rel(string): Link relationship; automatically includes noopener noreferrer for external links.download(string or boolean): Requests browser download and optionally supplies a filename.referrerPolicy(HTMLAttributeReferrerPolicy): Referrer policy for the link.onClick(MouseEventHandler): Click handler before navigation, or primary action when href is omitted.tooltip(string): Tooltip text shown on hover.isStandalone(boolean; default false): Applies base font sizing for non-inline links.type(TextType; default 'body'): Semantic Text type forwarded to the internal Text component.size(TextSize): Explicit font size override forwarded to Text.weight(TextWeight): Font weight override forwarded to Text.color(TextColor; default 'accent'): Text color forwarded to Text.display(TextDisplay; default 'inline'): Display type forwarded to Text.maxLines(number; default 0): Maximum lines before truncation.children(ReactNode; required): Link content.xstyle(StyleXStyles): StyleX styles for the root element.className(string): CSS class names for the root element.style(CSSProperties): Inline styles for the root element.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/Link.
Functions
constructor__init__(label, *, href='', underline=None, disabled=False, external=None, target=None, tooltip=None, standalone=None, text_type=None, size=None, weight=None, color=None, max_lines=None, **props) -> NoneparamlabelstrVisible or accessible label for the component.
paramhrefstr= ''Link destination URL.
paramunderlinebool | None= NoneWhether the underline is always visible.
paramdisabledbool= FalseWhether the link is disabled.
paramexternalbool | None= NoneWhether to use external-link behavior.
paramtargetstr | None= NoneBrowser navigation target.
paramtooltipstr | None= NoneHover tooltip text.
paramstandalonebool | None= NoneWhether to apply standalone text sizing.
paramtext_typestr | None= NoneSemantic text type.
paramsizestr | None= NoneExplicit text-size override.
paramweightstr | None= NoneFont-weight override.
paramcolorstr | None= NoneTheme text color.
parammax_linesint | None= NoneMaximum rendered lines before truncation.
parampropsAny= {}Returns
None