This paper investigates the problems of stability and $${L_\infty }$$ L ∞ -gain analysis for a class of positive switched systems with time-varying delay. Attention is focused on designing a state-dependent switching rule such that the system satisfies a prescribed $${L_\infty }$$ L ∞ -gain performance level, where the proposed scheme does not require the switching instants to be known in advance. By constructing an appropriate co-positive type Lyapunov–Krasovskii functional, sufficient conditions for exponential stability with $${L_\infty }$$ L ∞ -gain performance of the underlying systems are derived. Furthermore, the stability along the switching surface is analyzed. Finally, two examples are presented to demonstrate the effectiveness of the proposed method.