Table of Contents

Class TwInputGroupButton

Namespace
TwBlazor.Components
Assembly
TwBlazor.dll

A TwButton sized to sit inside a TwInputGroupAddon, such as a copy, search or show password button.

public class TwInputGroupButton : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
Inheritance
TwInputGroupButton
Implements
Inherited Members

Remarks

It is a compact Text button by default, rounded one step tighter than its group so its corners follow the field's, and smaller still in a Dense group. Give an icon-only button an AriaLabel.

Constructors

TwInputGroupButton()

public TwInputGroupButton()

Properties

ChildContent

Gets or sets content to show instead of Label.

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Color

Gets or sets the button's color.

[Parameter]
public Color? Color { get; set; }

Property Value

Color?

Disabled

Gets or sets whether the button is disabled.

[Parameter]
public bool Disabled { get; set; }

Property Value

bool

EndIcon

Gets or sets the icon shown after the label.

[Parameter]
public Icon? EndIcon { get; set; }

Property Value

Icon?

IconButton

Gets or sets whether the button is a square holding only an icon (its ChildContent or StartIcon). Give it an AriaLabel.

[Parameter]
public bool IconButton { get; set; }

Property Value

bool

Label

Gets or sets the text of the button. ChildContent is shown instead when it is set.

[Parameter]
public string Label { get; set; }

Property Value

string

OnClick

Gets or sets the callback invoked when the button is clicked.

[Parameter]
public EventCallback OnClick { get; set; }

Property Value

EventCallback

StartIcon

Gets or sets the icon shown before the label.

[Parameter]
public Icon? StartIcon { get; set; }

Property Value

Icon?

Tooltip

Gets or sets the text of a tooltip shown while the button is hovered or focused.

[Parameter]
public string? Tooltip { get; set; }

Property Value

string

Type

Gets or sets the button's type. Defaults to button, so it does not submit the form it sits in.

[Parameter]
public string Type { get; set; }

Property Value

string

Variant

Gets or sets the button's variant. Defaults to Text.

[Parameter]
public ButtonVariant? Variant { get; set; }

Property Value

ButtonVariant?

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder