  We formulate a microscopic theory to calculate cross section of the radiative
neutron capture reaction on neutron-rich nuclei using the continuum
random-phase approximation (cRPA) to the time-dependent density functional
theory (TDDFT). With an intension of applying to the r-process, for which the
statistical reaction model may not be appropriate, we describe the transition
between a initial state of incident neutron and a final state of the gamma
decay by means of a single many-body framework of the cRPA-TDDFT. With the cRPA
approach, it is possible to describe various excitation modes present in the
$(n,\gamma)$ reaction, including soft dipole excitation, the giant resonances
as well as non-collective excitations and the single-particle resonances.
Furthermore, it enables us to describe the $(n,\gamma)$ reaction where the
final states of the gamma transition are low-lying surface vibrational states.
We demonstrate the theory by performing numerical calculation for the reaction
$^{139}{\rm Sn} (n,\gamma) ^{140}{\rm Sn}$. We discuss various new features
which are beyond the single-particle model; presence of narrow and wide
resonances originating from non-collective and collective excitations and roles
of low-lying quadrupole and octupole vibrational states.
