Makng a crate texture that repeats tiling to the scale of the cube.

I’m using a crate texture on a cube that can be any scale. I change the tiling to match the box scale so it looks like multiple crates. So if the cube scale is (5,10,1) I change the tiling x,y to 5,10 so it looks like 10 crates wide and 5 crates high. It works fine in x, y with this technique, but Z is still stretched if I scale z. How do I add tiling for z? Is that a shader property? Is there a pre-made shader that has z tiling?

the easy answer is triplanar