A total Lagrangian finite element formulation for the analysis of large deformation of beams and frames, based on the strain-gradient elasticity theory and the Timoshenko beam model, is developed herein. A generalized version of the Kirchhoff-Saint Venant constitutive equation is proposed to capture geometric nonlinearities at small scales. Also, field variables are interpolated using C1 shape functions for constructing conforming elements. Accordingly, a novel 6-DOF two-node beam element is introduced. To analyze frames, the formulation is extended so that a 9-DOF two-node frame element is produced. Several examples are studied to show the accuracy of proposed elements.