WoW MagnetButtons addon Dragonflight/Wrath of the Lich King Classic 2024
wow addon MagnetButtons


Game Version: 9.2.7 +3
Total Downloads: 24,349
Updated: Sep 9, 2022
Created: Dec 7, 2018
download MagnetButtonsDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads release 45.58 KB Sep 9, 2022 9.2.7 +3 1,026 download MagnetButtons releaseDownload release 45.58 KB Sep 8, 2022 9.2.7 +3 86 download MagnetButtons releaseDownload release 45.38 KB Sep 8, 2022 9.2.7 +3 22 download MagnetButtons releaseDownload release 45.38 KB Sep 8, 2022 9.2.7 +3 9 download MagnetButtons releaseDownload release 45.32 KB Sep 6, 2022 9.2.7 +3 118 download MagnetButtons releaseDownload release 45.28 KB Sep 6, 2022 9.2.7 +3 15 download MagnetButtons releaseDownload release 45.26 KB Sep 6, 2022 9.2.7 +3 16 download MagnetButtons releaseDownload release 45.05 KB Sep 3, 2022 9.2.7 +1 148 download MagnetButtons releaseDownload release 43.95 KB May 27, 2020 8.3.0 +1 3,474 download MagnetButtons releaseDownload release 43.41 KB Mar 12, 2020 8.3.0 +1 2,142 download MagnetButtons releaseDownload release 43.28 KB Feb 13, 2020 8.3.0 +1 765 download MagnetButtons releaseDownload release 40.97 KB Feb 10, 2020 8.3.0 +1 600 download MagnetButtons releaseDownload beta 46.99 KB Jul 5, 2020 8.3.0 +1 415 download MagnetButtons betaDownload



Share this:


MagnetButtons is an addon that can create any number of free moving action buttons. Any magnet button can be individually moved around anywhere on the screen, and will also snap (like a magnet) to any side of another magnet button that is the same scale. Each magnet button can do five different actions based on the assigned button click (left, right, middle, button 4, or button 5) it receives; each of those clicks can also be assigned a hotkey.

MagnetButtons supports items, spells, trinkets, macros, flyouts, pet spells and actions, mounts, companions, and toys. Macros can be defined right in the button’s properties. For the sake of this addon and related documentation, attributes and properties are used interchangeably.

MagnetButtons REQUIRES the DoIt! addon to run. AddonsWoW should install the DoIt dependency automatically, but keep this in mind when installing manually and/or updating. I write both addons, but they are separate addons.


Creating Buttons

You can create buttons automatically by mouse dragging something and dropping it right on to the background window, if you hold down the shift button on the drop. There is also a slash command “/newb” that will create a new empty button in the middle of the screen and a keyboard binding available for the /newb command. 

Manipulating Buttons

  • Buttons can be changed at anytime (while not in combat) by using them as a drop target.
  • Press Control+LeftClick (over the button) to display a button’s properties frame.
  • You can delete a single button from the button’s properties frame.
  • Press Shift+LeftClick (over the button) to drag the button around. You can drag a button in-combat, but it will be unable to magnet-lock until combat ends.
  • Using the “Alt” key with a button will act normally (self-cast or cast).
  • You can delete all magnet buttons with the “/clearbuttons” or “/resetbuttons” slash command.



Button properties are divided into six tabs: General, Left Click, Right Click, Middle Button, Button 4, and Button 5. Most properties are not required (and will be ignored if set); the only required property is “type”.

Let’s walk though a button design from scratch… Type “/newb” slash command and MagnetButtons creates a new empty button in the center of the screen. Next, it’s properties need to be set. While written for developers, SecureActionButtonTemplate has a lot of helpful information regarding which properties/attributes are used together.

Example: Show the macro dialog (left click), or toggle the game menu (right click). When entering the macro, don’t enter the quotes. For additional macros, or to share your macros; check the Macro wiki page. The “+/” syntax is used to chain multiple slash commands in to the macrotext property (like multiple line macros), it’s an addon specific way to show a new line.

  • Type (left) = “macro”
  • Macro Text (left) = “/macro”
  • Type (right) = “macro”
  • Macro Text (right) = “/cleartarget +/stopcasting +/script ToggleGameMenu(); StaticPopup1:Hide()”
  • Texture = 133741 (or any other)
  • Tooltip = “Show macro dialog (left click), or toggle the game menu (right click)”


Tooltips for Macros

Instead of a plain text tooltip for macros, you can instead specify the item or spell property to specify the tooltip. Blizzard will ignore that property for a macro, but MagnetButtons will use it to display the tooltip of the spell or item. Keep in mind, if you set the tooltip property; that overrides everything so keep tooltip property blank to do this. Example…

  • type = “macro”
  • spell = “Bear Form”
  • macrotext = “/stand +/cancelform +/cast Bear Form”



MagnetButtons supports using specific spell-targets for a button. Unit targets can be set in the button’s properties. Valid values for the unit property can be found here.


Global Settings

Global settings can be found in Interface -> Addons -> MagnetButtons or with the “/mbconfig” slash command.



  • Finding texture id values
  • Macros Explained
  • Useful Macros
  • All Slash Commands
  • SecureActionButtonTemplate


Features In-Progress

  • Press Shift+Control+LeftClick (over a button) to drag an entire block of buttons (magnet locked together) to a new location.
  • Full support for all the bell’s and whistles of other buttons (range dots, border flash, sparkle when cool-down expires, etc…)
  • The ability to control visibility, transparency, or enabled; based on spec, specific pet, or zone type (dungeons, raids, world, pvp, arena).
  • Hide unusable properties for whatever the type specified is and constraining property values to valid values


Future Plans

  • Make an easy-mode, where the button editor looks kind of like the macros frame, with a multi-line editor and a dynamic texture (icon) selection.
  • Use addon messaging to quickly send buttons to people in your group.


Known Bugs and Issues

  • Cooldown times don’t appear in the tooltips.
  • Setting the “unit” attribute seems to mess with the cursor changes when holding down ctrl or shift over a magnet button. This seems to be a Blizzard API issue.
  • A button’s cooldown overlay is white instead of the normally black/dark color.
  • After a cinematic, MagnetButtons can’t be clicked again until after a /reload. This seems to effect many addons. [April 2019]
  • This is unavoidable because of Blizzard restrictions… If you get on “combat devices” (a cannon for example) the remapping of keys 1-6 (if assigned to a MagnetButton as a hotkey) might not change for the device being used (if in combat); those key bindings might or might not take hold. Try to mount such devices/vehicles before you personally start combat. (Retail Only)



When reporting bugs, debugging information will help me track down the problem, also state if bug is specific to retail, classic, or both.

— To Enable Debugging
/script DoIt_Saved.Debug = true
/script SetCVar(“ScriptErrors”, “1”)

— To Disable Debugging
/script DoIt_Saved.Debug = false
/script SetCVar(“ScriptErrors”, “0”)

Also it you are debugging I suggest BugGrabber and BugSack.



HUGE thanks to Semlar, author of AdvancedInterfaceOptions, for allowing me to use their widget to produce the properties editor! With having so many properties, an editor like this is invaluable.

Also a shout-out to imershon and mezz1945 who helped me by reporting issues that were lowering frame rates! Thanks, I appreciate all bug reports! 🙂




Add a comment