Transistor is NOT a passive electrical component. Instead, it is active circuit component.
Passive element is an electrical component that does not generate power. It dissipates, stores, and/or releases current.
Example: Resistances, capacitors, and coils... etc.
Transistors are an active circuit component because they can amplify the power of a signal.