Class TwLink
- Namespace
- TwBlazor.Components
- Assembly
- TwBlazor.dll
public class TwLink : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
- Inheritance
-
TwLink
- Implements
- Inherited Members
Constructors
TwLink()
public TwLink()
Properties
ChildContent
The child content of the link element.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
Color
Gets or sets the semantic colour of the link.
[Parameter]
public Color? Color { get; set; }
Property Value
Remarks
When neither Color nor Tone is set, a link without a custom Class uses the theme's primary text colour. A custom class replaces that default look, so links used inside a button keep the button's own colour; an explicit colour or tone is still applied.
Href
Gets or sets the URL that the hyperlink points to.
[Parameter]
public string Href { get; set; }
Property Value
Rel
Gets or sets the relationship between the linked resource and the current document.
[Parameter]
public string? Rel { get; set; }
Property Value
Remarks
When not set and Target is "_blank", defaults to "noopener" so a new-tab link
can't access window.opener on the page it opened. This property overrides that default.
Size
Gets or sets the size on the theme's font-size scale.
[Parameter]
public TextSize? Size { get; set; }
Property Value
Remarks
Leave it unset to inherit the surrounding font size.
Target
Gets or sets the name of the target frame or window for the navigation request.
[Parameter]
public string? Target { get; set; }
Property Value
Remarks
Set this property to specify where the linked content will be displayed. Common values include "_blank" to open in a new window or tab, "_self" to open in the same frame, and "_parent" or "_top" for parent or top-level frames. If not set, the default behaviour depends on the browser and context.
Tone
Gets or sets the neutral colour of the link.
[Parameter]
public TextTone? Tone { get; set; }
Property Value
Remarks
Truncate
Gets or sets whether overflowing link text is truncated with an ellipsis.
[Parameter]
public bool Truncate { get; set; }
Property Value
Weight
Gets or sets the weight on the theme's font-weight scale.
[Parameter]
public TextWeight? Weight { get; set; }
Property Value
Remarks
Leave it unset to inherit the surrounding font weight.
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder