The special theory of relativity says that the speed of light in vacuum is a constant $c$ in all inertial frames. Suppose a ray of light is moving in space. Let the source of light be the origin of our coordinate system and let the ray be moving in some random direction making some finite angles ($\alpha$, $\beta$, $\gamma$) with the $x$, $y$ and $z$ axes. Now, what are the $x$, $y$ and $z$ components of velocity of light in this case? Is the postulate of relativity applicable to components also? If that is the case, then all three components will have to be $c$ and vector sum should exceed $c$!
What I think is that you are getting the 1st postulate of STR wrong. It's the speed of light that remains invariant.
The velocity of light changes all the time in special inertial frames, even simply because of relative motion. Light can go in different directions.
What stays constant is the speed. The famous Michelson Morley experiment had that diagram in which light goes diagonally. The components add up to c. What stays constant is the speed. And STR says only of the magnitude of light being c.
If I understand your question correctly, the velocity components of the light ray can be found by using the usual trigonometric calculations you'd use on a typical point particle, but with a magnitude of c. The magnitude of the velocity of the photon/wavefront is what moves at the speed of light. It's components are arbitrary. In fact, breaking down a light ray into its (slower*) components is basically how we prove special relativity.