  We investigate the competition between the dipolar and the exchange
interaction in a ferromagnetic slab with finite thickness and finite width.
  From an analytical approximate expression for the Ginzburg-Landau effective
Hamiltonian, it is shown that, within a self-consistent Hartree approach, a
stable modulated configuration arises. We study the transition between the
disordered phase and two kinds of modulated configurations, namely, striped and
bubble phases. Such transitions are of the first-order kind and the striped
phase is shown to have lower energy and a higher spinodal limit than the bubble
one. It is also observed that striped configurations corresponding to different
modulation directions have different energies. The most stable are the ones in
which the modulation vanishes along the unlimited direction, which is a prime
effect of the slab's geometry together with the competition between the two
distinct types of interaction. An application of this model to the domain
structure of MnAs thin films grown over GaAs substrates is discussed and
general qualitative properties are outlined and predicted, like the number of
domains and the mean value of the modulation as functions of temperature.
