Class LinkButton
A navigation link wearing the appearance of an ActionButton.
public class LinkButton : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
- Inheritance
-
LinkButton
- Implements
- Inherited Members
Remarks
Use this to go somewhere and ActionButton to run something. Disabling drops the
href, so a disabled link can be neither followed nor focused.
A primary one is followed by the Enter key, in the same way a primary ActionButton is activated by it: whichever comes first in the nearest enclosing scope wins.
Properties
ChildContent
Text or tags to be displayed inside the button.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
Href
Navigation target. Without one the anchor is inert, which suits a splatted click handler.
[Parameter]
public string? Href { get; set; }
Property Value
IsEnabled
True by default. If false, the link cannot be followed, activated or focused.
[Parameter]
public bool IsEnabled { get; set; }
Property Value
IsSmall
Alter styling for the shorter row height used in tables.
[Parameter]
public bool IsSmall { get; set; }
Property Value
Level
Optional colour scheme.
[Parameter]
public MessageLevel? Level { get; set; }
Property Value
Splat
Extra attributes for the underlying <a> tag.
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object>? Splat { get; set; }
Property Value
Tier
Visual emphasis tier. Secondary (a neutral bordered button) by default.
[Parameter]
public ButtonTier Tier { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder