| Name |
Type |
Default value |
Description |
|---|
| Anchor |
RenderFragment? |
null |
Child content of component, the content that the Tooltip will apply to. |
| ArrowSize |
int? |
null |
The size in pixels of the arrow that points at the anchor, which is the length of the side of the square it is drawn from. Leaving it unset keeps the size the theme gives it. |
| ChildContent |
RenderFragment? |
null |
Child content of component, the content that the Tooltip will apply to. |
| Classes |
BitTooltipClassStyles? |
null |
Custom CSS classes for different parts of the BitTooltip. |
| Color |
BitColor? |
null |
The general color of the tooltip, which colors its surface and the arrow along with it. |
| DefaultIsShown |
bool? |
null |
Default value of the IsShown. |
| FullWidth |
bool |
false |
Expands the tooltip's own element to 100% of the available width, so that the anchor inside it keeps the width it would have had without a tooltip around it. The tooltip wraps its anchor in an element laid out inline, which would otherwise shrink a block-level anchor to its content. |
| HideArrow |
bool |
false |
Hides the arrow of tooltip. |
| HideDelay |
int |
0 |
Delay (in milliseconds) before hiding the tooltip. It is the grace an interactive tooltip needs while the pointer crosses the gap between the anchor and the tooltip, and the pause that keeps a tooltip from flickering while the pointer skims across a row of anchors. Leaving it alone inside a BitTooltipGroup takes the delay the group sets. |
| HideOnClick |
bool |
false |
Hides the tooltip when the anchor is pressed, which is what a tooltip on a control that does something when pressed owes the reader. It answers Enter and Space the way it answers the pointer. A tooltip the press is meant to open and close instead is ShowOnClick, which takes the press over when it is on. |
| Interactive |
bool |
false |
Lets the pointer travel into the tooltip and stay there without it being hidden, which is what WCAG 1.4.13 asks of content shown on hover. The gap between the anchor and the tooltip is bridged, so the pointer never leaves the component on its way over. |
| IsShown |
bool |
false |
The visibility state of the tooltip. |
| IsShownChanged |
EventCallback<bool> |
|
The callback that is called when the visibility state of the tooltip changes. |
| LazyRender |
bool |
false |
Holds the content of the tooltip out of the DOM until the tooltip is first shown, and keeps it rendered from then on. |
| MaxWidth |
string? |
null |
The maximum width of the tooltip as a CSS value (e.g. "20rem"), beyond which its text wraps onto another line instead of the tooltip growing wider. A value of "none" takes the cap off. |
| MirrorInRtl |
bool |
false |
Mirrors the position of the tooltip along the horizontal axis while the direction is right to left, so that a position named for one side of the anchor lands on the side the reader starts at. The positions are named for the sides of the screen rather than for the reading order, so Left is the left of the anchor in either direction unless this is turned on. |
| NoAnimation |
bool |
false |
Removes the fade the tooltip is shown and hidden with, so that it simply appears. |
| NoDismissOnEscape |
bool |
false |
Keeps the Escape key from dismissing the tooltip. Dismissing content shown on hover or focus without moving either of them is what WCAG 1.4.13 asks for, so only turn it off for a tooltip that obscures nothing. |
| NoTouch |
bool |
false |
Keeps a touch or a pen from showing the tooltip at all, leaving the anchor to answer the tap alone. Turn it on for a tooltip that only repeats what a touch user can already read. |
| Offset |
int? |
null |
The distance in pixels between the anchor and the tooltip, which is also the room the arrow is drawn in. An arrow that reaches further than this is given the room it needs anyway, so this is the smallest distance rather than the exact one. Leaving it unset keeps the distance the theme gives it. |
| OnHide |
EventCallback |
|
The callback that is called when the tooltip is hidden. |
| OnShow |
EventCallback |
|
The callback that is called when the tooltip is shown. |
| OnToggle |
EventCallback<bool> |
|
The callback that is called when the tooltip is shown or hidden, with the new state. |
| Position |
BitTooltipPosition |
BitTooltipPosition.Top |
The position of tooltip around its anchor. |
| Relationship |
BitTooltipRelationship |
BitTooltipRelationship.Description |
What the tooltip is to the anchor it belongs to, which decides whether the anchor is given an aria-describedby, an aria-labelledby or neither. The relationship is declared on the element the anchor is wrapped in and copied onto the first focusable control inside it, since a name or a description is computed on the element that has the focus. |
| ShowDelay |
int |
0 |
Delay (in milliseconds) before showing the tooltip. It applies to the pointer only: a tooltip reached with the keyboard or opened by a click is shown at once. Leaving it alone inside a BitTooltipGroup takes the delay the group sets, which the group also drops while another of its tooltips is still fresh in mind. |
| ShowOnClick |
bool |
false |
Turns the anchor into a toggle for the tooltip, which is shown by a press of it and taken away by the next one. Enter and Space are a press of the anchor as much as the pointer is, and what dismisses it besides a second press is the Escape key and the focus leaving the anchor. It takes the press over from HideOnClick. |
| ShowOnFocus |
bool |
true |
Determines whether the tooltip is shown when the anchor takes the focus, so that a tooltip reached with the keyboard is shown the way it is to a pointer. A focus that follows a press of the pointer is left to the pointer, the way :focus-visible does it in CSS. |
| ShowOnHover |
bool |
true |
Determines whether the tooltip is shown while the pointer is over the anchor. The hover and the focus are kept apart, so a pointer leaving an anchor the keyboard is still on does not take the tooltip away with it. |
| Size |
BitSize? |
null |
The size of the tooltip, which sets the size of its text and the padding around it. |
| Styles |
BitTooltipClassStyles? |
null |
Custom CSS styles for different parts of the BitTooltip. |
| Template |
RenderFragment? |
null |
The content you want inside the tooltip. |
| Text |
string? |
null |
The text of tooltip to show. |
| TouchHideDelay |
int |
1500 |
The time in milliseconds a tooltip shown by a touch stays before it hides itself. A touch leaves no pointer behind that can leave the anchor again. Zero leaves it shown until something else hides it. |
| TouchShowDelay |
int |
0 |
The time in milliseconds a touch has to rest on the anchor before the tooltip is shown, which turns a tap that only meant to press the anchor into a press that leaves the tooltip out of it. Zero shows the tooltip on the tap itself. |
| ZIndex |
int? |
null |
The stacking order of the tooltip surface and its arrow. Leaving it unset keeps the one the theme gives every popup surface in the library. |
| Name |
Type |
Default value |
Description |
|---|
| AriaLabel |
string? |
null |
Gets or sets the accessible label for the component, used by assistive technologies. |
| Class |
string? |
null |
Gets or sets the CSS class name(s) to apply to the rendered element. |
| Dir |
BitDir? |
null |
Gets or sets the text directionality for the component's content. |
| ForceAnimation |
bool |
false |
Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested. |
| HtmlAttributes |
Dictionary<string, object> |
new Dictionary<string, object>() |
Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters. |
| Id |
string? |
null |
Gets or sets the unique identifier for the component's root element. |
| IsEnabled |
bool |
true |
Gets or sets a value indicating whether the component is enabled and can respond to user interaction. |
| Style |
string? |
null |
Gets or sets the CSS style string to apply to the rendered element. |
| TabIndex |
string? |
null |
Gets or sets the tab order index for the component when navigating with the keyboard. |
| Visibility |
BitVisibility |
BitVisibility.Visible |
Gets or sets the visibility state (visible, hidden, or collapsed) of the component. |