Table of Contents

Class MudText

Namespace
MudBlazor
Assembly
MudBlazor.dll
public class MudText : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudText
Implements
Inherited Members
Extension Methods

Constructors

MudText()

public MudText()

Properties

Align

The text-align that will be used.

[Parameter]
[Category("Appearance")]
public Align Align { get; set; }

Property Value

Align

Remarks

Has no effect on inline displays. Defaults to Inherit.

ChildContent

The child content to display.

[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Classname

protected string Classname { get; }

Property Value

string

Color

The theme color of the component.

[Parameter]
[Category("Appearance")]
public Color Color { get; set; }

Property Value

Color

Remarks

Defaults to Inherit.

GutterBottom

Adds a bottom margin.

[Parameter]
[Category("Appearance")]
public bool GutterBottom { get; set; }

Property Value

bool

Remarks

Defaults to false. Has no effect on inline displays.

HtmlTag

The HTML element that will be rendered (Example: span, p, h1).

[Parameter]
[Category("Behavior")]
public string? HtmlTag { get; set; }

Property Value

string

Remarks

This can be used to specify the type of content for accessibility and SEO more accurately .

Defaults to null, meaning the tag be decided based on Typo.

Inline

Adds the d-inline display class, allowing text to continue on the same line rather than starting a new line.

[Parameter]
[Category("Behavior")]
public bool Inline { get; set; }

Property Value

bool

Remarks

Defaults to false, meaning no display class will be added.

RightToLeft

[CascadingParameter(Name = "RightToLeft")]
public bool RightToLeft { get; set; }

Property Value

bool

Typo

Applies theme typography styles to the element.

[Parameter]
[Category("Appearance")]
public Typo Typo { get; set; }

Property Value

Typo

Remarks

The rendered HTML tag is determined by the theme unless HtmlTag is set. The tag affects the display type and the applicability of properties like Align and GutterBottom.

Defaults to body1 which uses the block-level p element.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder