The non-smooth modelling of electrical systems, which allows for idealised switching components, is described using the flux approach. The formulations and assumptions used for non-smooth mechanical systems are adopted for electrical systems using the position-flux analogy. For the most important non-smooth electrical elements, like diodes and switches, set-valued branch relations are formulated and related to analogous mechanical elements. With the set-valued branch relations, the dynamics of electrical circuits are described as measure differential inclusions. For the numerical solution, the measure differential inclusions are formulated as a measure complementarity system and discretised with a difference scheme, known in mechanics as time-stepping. For every time-step a linear complementarity problem is obtained. Using the example of the DC-DC buck converter, the formulation of the measure differential inclusions, state reduction and their numerical solution using the time-stepping method is shown for the flux approach.