The FemtoMAX beamline facilitates studies of the structural dynamics of materials. Such studies are of fundamental importance for key scientific problems related to programming materials using light, enabling new storage media and new manufacturing techniques, obtaining sustainable energy by mimicking photosynthesis, and gleaning insights into chemical and biological functional dynamics. The FemtoMAX beamline utilizes the MAX IV linear accelerator as an electron source. The photon bursts have a pulse length of 100fs, which is on the timescale of molecular vibrations, and have wavelengths matching interatomic distances (Å). The uniqueness of the beamline has called for special beamline components. This paper presents the beamline design including ultrasensitive X-ray beam-position monitors based on thin Ce:YAG screens, efficient harmonic separators and novel timing tools.The FemtoMAX beamline facilitates studies of the structural dynamics of materials on the femtosecond timescale. The first commissioning results are presented.