Skip to main content

Overview

Text displays show customizable text using format strings, custom fonts, and dynamic content from trigger states. They’re perfect for names, values, custom messages, and formatted information.
Text displays support dynamic placeholders that update automatically based on trigger state.

Basic Configuration

{
  regionType = "text",
  displayText = "%n",  -- Show trigger name
  font = "Friz Quadrata TT",
  fontSize = 16,
  color = {1, 1, 1, 1},
  justify = "LEFT",
  
  selfPoint = "BOTTOM",
  anchorPoint = "CENTER",
  xOffset = 0,
  yOffset = 0
}

Text Content

Format Placeholders

%n  -- Trigger name (spell/aura name)
%i  -- Icon path
%s  -- Stack count
%t  -- Total value
%c  -- Current value
%p  -- Progress (remaining time or value/total)

Custom Text Function

-- Custom Text field in trigger
function()
  local health = UnitHealth("player")
  local maxHealth = UnitHealthMax("player")
  local percent = floor((health / maxHealth) * 100)
  return percent .. "%"
end

-- Display Text
displayText = "Health: %c"
Use customTextUpdate = "update" to refresh custom text every frame for dynamic values.

Font Configuration

Font Selection

{
  font = "Friz Quadrata TT",  -- Built-in font
  font = "Arial Narrow",      // LSM font
  fontSize = 16
}

Font Outline

{
  outline = "OUTLINE",        -- Black outline
  outline = "THICKOUTLINE",   // Thick outline
  outline = "None"            // No outline
}

None

Clean text, no border

Outline

Thin black outline

Thick Outline

Thick black outline

Shadow

{
  shadowColor = {0, 0, 0, 1},
  shadowXOffset = 1,
  shadowYOffset = -1
}

Text Alignment

{
  justify = "LEFT",    -- Left-aligned
  justify = "CENTER",  // Centered
  justify = "RIGHT"    // Right-aligned
}

Size and Wrapping

Automatic Width

{
  automaticWidth = "Auto"  -- Resize to fit text
}

Fixed Width

{
  automaticWidth = "Fixed",
  fixedWidth = 200,
  wordWrap = "WordWrap"  -- or "NoWrap"
}
Text region automatically resizes to fit content. Best for dynamic text lengths.
Text wraps within fixed width. Use for tooltips or multi-line displays.
Breaks text at word boundaries when using fixed width.

Color

Static Color

{
  color = {1, 1, 1, 1}  -- White (R, G, B, A)
}

Dynamic Color via Conditions

{
  conditions = {{
    check = {
      trigger = 1,
      variable = "value",
      op = "<",
      value = 20
    },
    changes = {{
      property = "color",
      value = {1, 0, 0, 1}  -- Red when low
    }}
  }}
}

Common Patterns

Simple Name Display

{
  regionType = "text",
  displayText = "%n",
  font = "Friz Quadrata TT",
  fontSize = 16,
  color = {1, 1, 1, 1},
  justify = "CENTER",
  automaticWidth = "Auto"
}

Stack Counter

{
  regionType = "text",
  displayText = "%s",  -- Stack count
  font = "Friz Quadrata TT",
  fontSize = 20,
  color = {1, 1, 1, 1},
  outline = "THICKOUTLINE",
  justify = "CENTER"
}

Timer Display

{
  regionType = "text",
  displayText = "%p",  -- Time remaining
  font = "Arial Narrow",
  fontSize = 14,
  color = {1, 1, 0, 1},  -- Yellow
  outline = "OUTLINE",
  justify = "CENTER",
  
  -- Color red when < 5 seconds
  conditions = {{
    check = {
      trigger = 1,
      variable = "expirationTime",
      op = "<",
      value = 5
    },
    changes = {{
      property = "color",
      value = {1, 0, 0, 1}
    }}
  }}
}

Health Percentage

-- Custom text function
function()
  local health = UnitHealth("player")
  local maxHealth = UnitHealthMax("player")
  return floor((health / maxHealth) * 100)
end

-- Display configuration
{
  regionType = "text",
  displayText = "%c%%",  -- Custom value with % sign
  font = "Friz Quadrata TT",
  fontSize = 18,
  color = {0, 1, 0, 1},
  customTextUpdate = "update"  // Update every frame
}

Multi-Line Info

{
  regionType = "text",
  displayText = "%n\\n%p\\nStacks: %s",
  font = "Friz Quadrata TT",
  fontSize = 12,
  color = {1, 1, 1, 1},
  outline = "OUTLINE",
  justify = "LEFT",
  automaticWidth = "Fixed",
  fixedWidth = 150,
  wordWrap = "WordWrap"
}

Unit Name Display

{
  regionType = "text",
  displayText = "%unitName",
  font = "Friz Quadrata TT",
  fontSize = 14,
  color = {1, 0.8, 0, 1},  -- Gold
  outline = "OUTLINE",
  justify = "CENTER",
  automaticWidth = "Auto"
}

Advanced Formatting

Number Formatting

Use custom text functions for advanced number formatting:
function()
  local value = 1234567
  
  -- Thousands separator
  local formatted = string.format("%d", value)
  formatted = formatted:reverse():gsub("(%d%d%d)", "%1,")
  formatted = formatted:reverse():gsub("^,", "")
  
  -- Short form (1.2M)
  if value >= 1000000 then
    return string.format("%.1fM", value / 1000000)
  elseif value >= 1000 then
    return string.format("%.1fK", value / 1000)
  end
  
  return tostring(value)
end

Time Formatting

function()
  local remaining = aura_env.state.expirationTime - GetTime()
  
  if remaining < 0 then
    return "Ready"
  elseif remaining < 60 then
    return string.format("%.0fs", remaining)
  elseif remaining < 3600 then
    return string.format("%.1fm", remaining / 60)
  else
    return string.format("%.1fh", remaining / 3600)
  end
end

Conditional Text

function()
  local state = aura_env.state
  
  if state.stacks and state.stacks > 1 then
    return string.format("%s (%d)", state.name, state.stacks)
  else
    return state.name or "Unknown"
  end
end

Text Formatters

WeakAuras provides format modifiers:
-- Time formatters
%p          -- Auto format (5s, 1.2m, etc)
%p:time     // Force time format
%p:number   // Force number

-- Custom format in display settings
displayText_format_p_time_format = "%.1f"  -- 1 decimal
displayText_format_p_time_dynamic = true   -- Auto units
Access format options in the Text display settings under “Text Format”.

Properties Reference

Modifiable via Conditions

PropertyTypeDescription
colorcolorText RGBA color
fontSizenumberFont size in pixels
displayTextstringText content with placeholders

Performance

customTextUpdate = "event"   -- Update on trigger (efficient)
customTextUpdate = "update"  -- Update every frame (costly)
Use “event” unless you need real-time updates.
Complex custom text functions run frequently. Keep them simple and cache values.
Automatic width recalculates on text change. Use fixed width for static layouts.

Troubleshooting

  • Verify placeholder syntax (%n, %p, etc)
  • Check trigger provides the required state property
  • Ensure customText function returns a value
  • Verify customTextUpdate setting
  • Use fixed width with word wrap
  • Adjust fontSize
  • Check z-order and frame levels
  • Verify anchor points
  • Verify font name matches exactly
  • Check LSM font is installed
  • Try a built-in WoW font
  • Check for font path errors in chat

Best Practices

Icon Display

Combine text with icons

Custom Code

Advanced text formatting

Conditions

Dynamic text properties

Build docs developers (and LLMs) love