Skip to content
daisyBlazor

Field

A read-only labelled value with the same chrome as a TextField, for showing data in a form layout without making it editable.
Data input.fieldsetReplaces MudField
Cover · <Field>
Customer
Northwind Traders
Plan
Enterprise
Since
2019
Seats
250

Examples

Basic

Label on top, ChildContent as the value.

Invoice no.
INV-2041
Plan
Pro
Renews
March 2027
website/Examples/DataInput/FieldBasicExample.razor Source

Adornment

An AdornmentIcon at the start or end, like the editable fields.

Region
eu-west-1, Dublin
Domain
Verified by DNS
website/Examples/DataInput/FieldAdornmentExample.razor Source

Field is handy for showing a derived value next to the input that drives it.

As shown on the badge
CUSTOMER PORTAL
website/Examples/DataInput/FieldBoundExample.razor Source

Playground

Plan
Pro
Adornment Adornment
<Field
       Label="Plan"
       Adornment="Adornment.Start"
       AdornmentIcon="credit_card">
    Pro
</Field>

API

<Field>

DaisyBlazor

Parameters

  • Adornment Adornment
    = Adornment.None

    Position of the adornment icon: Start, End or None (default).

  • AdornmentIcon string
    = null

    Icon name rendered at the position set by Adornment.

  • AdornmentText string
    = null

    Text rendered as the adornment at the position set by Adornment (after the icon when both are set).

  • Label string
    = null

    Label text rendered above the value surface.

  • Variant Variant
    = Variant.Text

    Surface style: Outlined draws a border, Filled a bg-base-200 fill, Text (default) a bottom border.

  • Class string
    = null

    Extra CSS classes merged onto the root fieldset element.

  • Style string
    = null

    Inline CSS styles applied to the root element.

Content

  • ChildContent RenderFragment

    The value content displayed inside the read-only surface.

From MudField

Field keeps MudField's parameter names, so most markup moves over by dropping the Mud prefix. See the migration guide for the shared enums, icons and services.

<MudField> <Field>
Something went wrong while running the docs. Reload