Skip to content

SusTooltip

SusTooltip

Rich hover card (.sharq). For app-wide hover APIs prefer TooltipService +

Package

SusKit · Overlay (commercial)

Open in Playground

SusKit · Overlay

Props

NameTypeDefault
TextProp<string>""v-model
ShowHeaderProp<bool>falsev-model
HeaderIconProp<string>""v-model
HeaderTitleProp<string>""v-model
HeaderTypeProp<string>""v-model
ShowBodyProp<bool>truev-model
ShowDescriptionProp<bool>truev-model
ShowQuoteProp<bool>falsev-model
ShowImageProp<bool>falsev-model
ShowParamsProp<bool>falsev-model
DescriptionProp<string>""v-model
QuoteProp<string>""v-model
ImageSrcProp<string>""v-model
ShowHeroProp<bool>falsev-model
HeroValueProp<string>""v-model
HeroLabelProp<string>""v-model
HeroSlotProp<string>""v-model
ShowBarsProp<bool>falsev-model
ShowPerksProp<bool>falsev-model
ShowFooterProp<bool>falsev-model
ShowFooterButtonsProp<bool>falsev-model
FooterTextProp<string>""v-model
DisabledProp<bool>falsev-model
OpenProp<bool>falsev-model
TrackMouseProp<bool>falsev-model
PreferredSideProp<string>"auto"v-model
OpenDelayProp<float>300fv-model
CloseDelayProp<float>0fv-model
TransitionDurationProp<float>280fv-model
OffsetProp<float>12fv-model
MaxWidthProp<float>360fv-model
PersistentProp<bool>falsev-model
TriggerProp<string>"auto"v-model
ShowModeProp<string>"popover"v-model
OverlayProp<bool>truev-model
_animFromProp<string>"right"v-model

Slots

Name
activator

Events

NameFieldPayload
CloseOnClose

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-img
  • sus-img--rounded-md
  • sus-inventory-item__tip
  • sus-tooltip
  • sus-tooltip__bar
  • sus-tooltip__bar-label
  • sus-tooltip__bar-track
  • sus-tooltip__bar-value
  • sus-tooltip__bars
  • sus-tooltip__body
  • sus-tooltip__card
  • sus-tooltip__card--from-bottom
  • sus-tooltip__card--from-left
  • sus-tooltip__card--from-right
  • sus-tooltip__card--from-top
  • sus-tooltip__card--inline
  • sus-tooltip__card--placement-bottom
  • sus-tooltip__card--placement-left
  • sus-tooltip__card--placement-right
  • sus-tooltip__card--placement-top
  • sus-tooltip__card--sheet
  • sus-tooltip__card--sheet-inline
  • sus-tooltip__description
  • sus-tooltip__footer
  • sus-tooltip__footer-btn
  • sus-tooltip__footer-buttons
  • sus-tooltip__footer-text
  • sus-tooltip__header
  • sus-tooltip__header-icon
  • sus-tooltip__header-title
  • sus-tooltip__header-titles
  • sus-tooltip__header-type
  • sus-tooltip__hero
  • sus-tooltip__hero-label
  • sus-tooltip__hero-slot
  • sus-tooltip__hero-value
  • sus-tooltip__image
  • sus-tooltip__param
  • sus-tooltip__param-key
  • sus-tooltip__param-value
  • sus-tooltip__params
  • sus-tooltip__perk
  • sus-tooltip__perk-dot
  • sus-tooltip__perk-label
  • sus-tooltip__perks
  • sus-tooltip__quote
  • sus-tooltip__quote-text
  • sus-tooltip--disabled
  • sus-tooltip--inventory
  • sus-tooltip--open
  • sus-tooltip--popover
  • sus-tooltip--rarity-common
  • sus-tooltip--rarity-epic
  • sus-tooltip--rarity-exotic
  • sus-tooltip--rarity-legendary
  • sus-tooltip--rarity-rare
  • sus-tooltip--rarity-uncommon
  • sus-tooltip--sheet

TooltipService (kit)

Wire once at bootstrap (OverlayHost from SusApp / SusBootstrap):

csharp
var tooltip = new TooltipService();
tooltip.Init(app.Overlay);
tooltip.CreateTooltip = () => new SusTooltip();
TooltipService.Instance = tooltip;

Fluent API

csharp
// Text
button.WithTooltip("Click to save");
icon.WithTooltip("Help", TooltipPlacement.Right);

// Rich entry (CreateCard factory)
spell.WithTooltip(new SusTooltipCardEntry {
    Title = "Fireball",
    Description = "Damage 50–70",
});

// Custom VisualElement card (ShowContent) — any factory
slot.WithTooltip(() => BuildItemCard(item), TooltipPlacement.Right);
APIRole
ShowAtElementText via CreateTooltip
ShowContentCustom Func<VisualElement> on OverlayHost Tooltip layer
ShowRichSusTooltipCardEntry via CreateCard
Hide / HideAfterDelayDismiss

Only one service tooltip is active at a time. Placement: Auto / Top / Bottom / Left / Right with edge clamp.

Component usage

Declarative activator + rich card props (teleports to OverlayHost on open):

csharp
var tip = new SusTooltip();
tip.ShowHeader.Value = true;
tip.HeaderTitle.Value = "Fireball";
tip.HeaderType.Value = "Spell";
tip.HeaderIcon.Value = "fire";
tip.ShowBody.Value = true;
tip.ShowDescription.Value = true;
tip.Description.Value = "Deals fire damage in a small area.";
tip.OpenDelay.Value = 200f;
tip.PreferredSide.Value = "auto";
tip.Slot("activator").Add(triggerButton);
xml
<template>
  <sus:SusTooltip :Text="Label.Value"
                  :ShowHeader="ShowHeader.Value"
                  :HeaderTitle="Title.Value"
                  :HeaderType="Type.Value"
                  :HeaderIcon="Icon.Value"
                  :ShowDescription="ShowDesc.Value"
                  :Description="Desc.Value"
                  :PreferredSide="Side.Value"
                  :OpenDelay="Delay.Value"
                  :Open="Open.Value"
                  :Disabled="Disabled.Value">
    <template #activator>
      <sus:SusButton Text="Hover me" />
    </template>
  </sus:SusTooltip>
</template>

<script>
public Prop<string> Label = new("");
public Prop<bool> ShowHeader = new(true);
public Prop<string> Title = new("Fireball");
public Prop<string> Type = new("Spell");
public Prop<string> Icon = new("fire");
public Prop<bool> ShowDesc = new(true);
public Prop<string> Desc = new("Deals fire damage in a small area.");
public Prop<string> Side = new("auto");
public Prop<float> Delay = new(200f);
public Prop<bool> Open = new(false);
public Prop<bool> Disabled = new(false);
</script>

SusTooltip teleports its card to OverlayHost on open (same Tooltip category as the service).

Rarity headers

Inventory / item cards may set sus-tooltip--rarity-*. Colors come from kit tokens --sk-rarity-* (override in consumer theme):

ClassToken
…--rarity-common--sk-rarity-common
…--rarity-uncommon--sk-rarity-uncommon
…--rarity-rare--sk-rarity-rare
…--rarity-epic--sk-rarity-epic
…--rarity-legendary--sk-rarity-legendary
…--rarity-exotic--sk-rarity-exotic