4,915 Downloads Last Updated: Oct 14, 2019 Game Version: 8.2.5


MagnetButtons is an addon that can create any number of free moving action buttons. Any MagnetButton can be individually moved around anywhere on the screen, and will also snap (like a magnet) to any side of another MagnetButton that is the same scale. Each magnet button can do five different things 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. It really reduces screen clutter as well.

MagnetButtons supports items, spells, trinkets, macros, flyouts, pet spells and actions, mounts, and toys. Support for companions is coming eventually; although in the meantime, you can implement them as macros. Personally, I like writing self-contained macro buttons. For the sake of this addon and related documentation, attributes and properties are used interchangeably.


Global Settings

Global settings can be found in Interface -> Addons -> MagnetButtons or with the "/mbconfig" slash command. Changes to global settings while you are in combat will happen after combat ends.

Creating Buttons

You can create buttons automatically by dropping drags right on to the background window while holding the shift button down and releasing the click to 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. Please note that all pet spells need to dragged from the spellbook, and not from an action bar.

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.
  • Press Shift+LeftClick (over the button) to drag the button around. You can drag a button while in-combat, but it will be unable to magnet-lock (until combat ends).
  • Pressing the "Alt" key over a button will act normally (self-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)"



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.




Features In-Progress

  • The ability to control visibility, transparency, or enabled; based on spec, specific pet, or zone type (dungeons, raids, world, pvp, arena).
  • Support for companions
  • Hide unusable properties for whatever the type specified is.and constraining property values to valid values


Future Plans

  • Full support for all the bell's and whistles of other buttons (range dots, border flash, sparkle when cool-down expires, etc...)
  • 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.
  • Moving buttons as a block of buttons, different container options and selection sets.
  • Use addon messaging to quickly send buttons to people in your group.
  • MagnetButtons is being designed to not only work on it's own, but also to be used by other addons via a script API.


Known Bugs and Issues

  • After a cinematic, MagnetButtons can't be clicked again until after a /reload. This seems to effect many addons.
  • Since I implemented the drop to background feature to create buttons; I needed to replicate some default Blizzard UI... Drops on players to trade something is not supported (you can still traditionally open trade). I should be able to fix this (at least when not in-combat). The flip side of the coin is you can delete trash items with one less click.
  • The zonetype property is not working.
  • Bug when dragging pet buttons from pet page 2.
  • There is an LUA error (in Blizzard's scripts when using flyouts in SecureActionButtonTemplates), when opening and closing of flyout menus, but it does not impact functionality of flyouts. If you are a developer, you will see an LUA error frame here; if you are a regular player then you will not; Blizzard hides LUA errors by default.
  • 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 before you personally start combat.



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.


  • To post a comment, please or register a new account.
Posts Quoted: