Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Beside a label

Place the tip right after a field label, so the explanation sits where the question is asked.

A tip next to a field label
The button carries a label announced to screen readers; the content fills the popover.
Risk tolerance
Show code
<span class="label d-inline-flex align-items-center gap-1">
    Risk tolerance
    <app-info-tip label="What is risk tolerance?">
        The maximum acceptable annual loss probability under IEC 62305. Values above this threshold require additional protection measures.
    </app-info-tip>
</span>

Rich content

Keep the explanation to a sentence or two. A tip explains a term; it should not document the feature.

A tip explaining a formula
Collection area
Show code
<span class="label d-inline-flex align-items-center gap-1">
    Collection area
    <app-info-tip label="How is collection area computed?">
        The equivalent ground area (m²) that attracts the same number of strikes as the structure, derived from its length, width, and height.
    </app-info-tip>
</span>

Title, body or both

Pass a label for the heading, content for the body, or both. The popover adapts to whichever you pass.

Each combination
Left: heading and body. Middle: heading only. Right: body only.
Show code
<app-info-tip label="ISO 27001">An information-security standard.</app-info-tip>
<app-info-tip label="ISO 27001"></app-info-tip>
<app-info-tip>An information-security standard.</app-info-tip>

Placement

The popover opens on the side with room by default. Pin it with placement when the layout needs a fixed side.

Open on any side
Hover each “?” to see where its popover opens.
Top Bottom Start End
Show code
<app-info-tip label="Top" placement="Top">Opens above.</app-info-tip>
<app-info-tip label="Bottom" placement="Bottom">Opens below.</app-info-tip>
<app-info-tip label="Start" placement="Start">Opens at the start side.</app-info-tip>
<app-info-tip label="End" placement="End">Opens at the end side.</app-info-tip>

Width

Choose the widest the card may grow before its text wraps. A short tip stays as narrow as its text.

Four widths, same text
Hover each “?”. The same long explanation wraps at each width.
sm (220px) md (276px) lg (360px) xl (480px)
Show code
<app-info-tip label="Small" width="Sm">…</app-info-tip>
<app-info-tip label="Medium">…</app-info-tip>
<app-info-tip label="Large" width="Lg">…</app-info-tip>
<app-info-tip label="Extra large" width="Xl">…</app-info-tip>

Every option

Every value of every prop, one cell each.

placement: all five

placement="auto" (default)
Label
placement="top"
Label
placement="bottom"
Label
placement="start"
Label
placement="end"
Label

title / body combinations

label + content
label only (heading, no body)
content only (body, generic trigger name)
neither (renders nothing)

content edge cases

long body: wraps rather than overflowing
rich markup content (not just plain text)

width: all four

width="md" (default)
Label
width="sm"
Label
width="lg"
Label
width="xl"
Label

className

class="ms-3" (extra classes on the wrapper)
Label

Guidance

What to do, and what to avoid.

Use it when

  • A field label uses a term the user may not know and you want an on-demand explanation.
  • The help is secondary, useful but not something every user needs to read.
  • You want accessible hover/focus behaviour without wiring a tooltip yourself.

Reach for something else when

  • The message must be seen by everyone, persistently, in context. → AppAlert
  • It is a permanent helper text under a field the user should always read. → the helperText prop on AppInput
  • You would otherwise expose the text via a native title="". → AppInfoTip
  • It is a brief, transient confirmation after an action. → toast

Ask the question in the label

Do
Risk tolerance

Give the tip a descriptive label (a real question) so it’s clear what the “?” explains, and keep the body to a sentence.

Avoid
Risk tolerance

A vague “info” label and a wall of text overload a tip: move long explanations into a linked doc.

Attach the tip to its term

Do
Collection area

Attach the tip to the exact term it explains, inline with the label, so the “?” sits where the question arises.

Avoid
Collection area

Burying the explanation elsewhere (or omitting it) forces the user to leave the field to understand it.

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

auto top bottom start end
md sm lg xl
Field label
React, generated from the controls
<AppInfoTip label="What is risk tolerance?">The maximum acceptable annual loss probability under IEC 62305.</AppInfoTip>
Razor, the same props
<app-info-tip label="What is risk tolerance?">The maximum acceptable annual loss probability under IEC 62305.</app-info-tip>

4 props. The 3 most used come first.

Used on most screens 3 props

PropTypeDefaultDescription
labeldefault - string - The popover title and the trigger’s accessible name. Unset, the trigger is named “More information”.
placementdefault auto auto | top | bottom | start | end auto Where the popover opens. Auto flips it to stay in view.
widthdefault md sm | md | lg | xl md The widest the card grows before its text wraps, at 220, 276, 360 or 480px. It is a maximum, so a short tip stays as narrow as its text.

Less common 1 props

PropTypeDefaultDescription
(content)default - markup - The popover body. Omit for a heading-only tip. With neither label nor content, the tag helper suppresses its output.

Screen reader

3 notes
  • The trigger is a button named by the label, or “More information” when there is no label.
  • It opens on hover and focus, and aria-expanded follows the open state.
  • With neither label nor body, the component renders nothing.

Do and avoid

2 pairs

Ask the question in the label

Do
Risk tolerance

Give the tip a descriptive label (a real question) so it’s clear what the “?” explains, and keep the body to a sentence.

Avoid
Risk tolerance

A vague “info” label and a wall of text overload a tip: move long explanations into a linked doc.

Attach the tip to its term

Do
Collection area

Attach the tip to the exact term it explains, inline with the label, so the “?” sits where the question arises.

Avoid
Collection area

Burying the explanation elsewhere (or omitting it) forces the user to leave the field to understand it.