The analogies may be built in various ways – similar simple mathematical relationships like $U=RI$ are among many of them – but I would choose the analogy consistent with the Czech language where "napětí" [nuh-pyeh-tyea] means both "voltage" and "tension". I guess that even English speakers must sometimes say "electric tension" instead of "voltage".
In the analogy inspired by this (not quite) coincidence, the voltage and analogously the stress (or tension) may be considered as the reason, and the current and analogously the deformation (strain, the relative change of the length etc.) is the consequence. For a resistor, we have Ohm's law
$$ I = \frac{U}{R} $$
and for springs, we have the analogous Hooke's law
$$ X = \frac{F}{k} $$
where $R,k$ are the resistance and the spring constant, respectively. Hooke's law for the continuous media generalizes the $F=kX$ Hooke's law above:
$$ \sigma_{ij} = -\sum_{k,\ell=1}^{3} c_{ijkl} \epsilon_{kl} $$
where $c$ is the stiffness/elasticity tensor generalizing $k$, the stress tensor $\sigma$ generalizes $F$, the $\epsilon$ is the strain tensor generalizing $X$. There are various symmetries over the indices etc. This tensor equation is the counterpart of the local version of Ohm's law
$$ \vec \jmath = \sigma \vec E $$
where the new $\sigma$ is the conductivity generalizing $1/R$ for a wire, $\vec \jmath$ is the current density, and $\vec E$ is the electric field. Sometimes, the conductivity may also be replaced by a tensor to get
$$ j_i = \sum_{k=1}^3 \sigma_{ik} E_k $$
The number and structure of the tensor indices is different in the electric/resistor and mechanical/stress examples but there is an analogy. To some extent, one could even find the mechanical counterparts of the coils or capacitors in this dictionary.