A protein which is involved in the transcription of genes. These usually bind to DNA as part of their function (but not necessarily). A transcription factor may be general (i.e., acting on many or all genes in all tissues) or tissue-specific (i.e., present only in a particular cell type and activating the genes restricted to that cell type). Its activity may be constitutive or may depend on the presence of some stimulus; for example, the glucocorticoid receptor is a transcription factor which is active only when glucocorticoids are present.