We calculate the optical bJ luminosity function (LF) of the 2dF Galaxy Redshift Survey (2dFGRS) for different subsets defined by their spectral properties. These spectrally selected subsets are defined using a new parameter, η, which is a linear combination of the first two projections derived from a Principal Component Analysis. This parameter η identifies the average emission-and absorption-line strength in the galaxy rest frame spectrum, and hence is a useful indicator of the present star formation. We use a total of 75000 galaxies in our calculations, chosen from a sample of high signal-to-noise ratio, low-redshift galaxies observed before 2001 January. We find that there is a systematic steepening of the faint-end slope (α) as one moves from passive (α = -0.54) to active (α = -1.50) star-forming galaxies, and that there is also a corresponding faintening of the rest frame characteristic magnitude M* - 5 log10(h) (from -19.6 to -19.2). We also show that the Schechter function provides a poor fit to the quiescent (Type 1) LF for very faint galaxies [MbJ -5 log10(h) fainter than -16.0], perhaps suggesting the presence of a significant dwarf population. The LFs presented here give a precise confirmation of the trends seen previously in a much smaller preliminary 2dFGRS sample, and in other surveys. We also present a new procedure for determining self-consistent k-corrections, and investigate possible fibre-aperture biases.