Axonal growth is a complex phenomenon in which many intra-and extra-cellular signals collaborate simultaneously. Two different compartments can be identified in the growing axon: the growth cone, the leading tip that guides and steers the axon, and the axonal shaft, connecting the soma to the growth cone. The complex relations between both compartments and how their interaction leads the axon to its final synaptic target remain a topic of intense scrutiny. Here, we present a continuum and computational model for the development of the axonal shaft. Two different regions are considered: the axoplasm, filled with microtubules, and the surrounding cortical membrane, consisting mainly of F-actin, Myosin II motor proteins and the membrane. Based on the theory of morphoelasticity, the deformation gradient is decomposed into anelastic and viscoelastic parts. The former corresponds to either a growth tensor for the axoplasm, or a composition of growth and contractile tensors for the cortical membrane. The biophysical evolution for the anelastic parts is obtained at the constitutive level, in which the polymerization and depolymerization of microtubules and F-actin drive the growth, while the contractility is due to the pulling exerted by the Myosin II on the F-actin and depends on the stress. The coupling between cytoskeletal dynamics and mechanics is naturally derived from the equilibrium equations. The framework is exploited in two representative scenarios in which an external force is applied to the axonal shaft either along the axis or off the axis. In the first case three states are found: growth, collapse and stall. In the second case, axonal turning is observed. This framework is suitable to investigate the complex relationship between the local mechanical state, the cytoskeletal polymerization/depolymerization rates, and the contractility of the cortical membrane in axonal guidance.