  The most common form of magnetar activity is short X-ray bursts, with
durations from milliseconds to seconds, and luminosities ranging from $10^{36}$
to $10^{43}\ {\rm erg}\,{\rm s}^{-1}$. Recently, an X-ray burst from the
galactic magnetar SGR 1935+2154 was detected to be coincident with two fast
radio burst (FRB) like events from the same source, providing evidence that
FRBs may be linked to magnetar bursts. Using fully 3D force-free
electrodynamics simulations, we show that such magnetar bursts may be produced
by Alfv\'{e}n waves launched from localized magnetar quakes: a wave packet
propagates to the outer magnetosphere, becomes nonlinear, and escapes the
magnetosphere, forming an ultra-relativistic ejecta. The ejecta pushes open the
magnetospheric field lines, creating current sheets behind it. Magnetic
reconnection can happen at these current sheets, leading to plasma energization
and X-ray emission. The angular size of the ejecta can be compact, $\lesssim 1$
sr if the quake launching region is small, $\lesssim 0.01$ sr at the stellar
surface. We discuss implications for the FRBs and the coincident X-ray burst
from SGR 1935+2154.
