Probably not illegal in the US as an aftermarket item. There are lots of things that can't come from the factory because they're unsafe but if you put it on yourself after manufacture there's nothing illegal about it. Also, lots of things that would be illegal on cars get by on motorcycles. Just so few on the road comparitively they don't bother making the rules.
Scott