Let G be a graph and \(\mathcal {H}\) be a set of connected graphs. An \(\mathcal {H}\) -factor of G is a spanning subgraph, whose every component is isomorphic to a member of \(\mathcal {H}\) . An \(\mathcal {H}\) -factor is also referred as a component factor. In this article, we present a spectral condition for a graph to admit a \(\{P_2,C_3, P_5,\mathcal {T}(3)\}\) -factor, where \(\mathcal {T}(3)\) is one special family of tree. Furthermore, we construct two extremal graphs to claim that the bounds on the spectral radius in our main result are sharp.