Using first-principles calculations, based on density functional theory, we have investigated the mechanical and electronic properties of hydrogen-passivated 3C-, 2H-, 4H-, and 6H-SiC nanowires, analyzing the effects of the diameter on these properties. Our results show that the band-gap energies of the nanowires are larger than the corresponding bulk values, and decrease with the increasing diameter. All nanowires investigated exhibit direct band gaps, in contrast with the indirect band gaps observed in bulk SiC. The effect of uniaxial stress on the electronic properties of SiC nanowires has been also examined, and our results reveal that the band-gap dependence on the strain is different for each nanowire polytype. In 3C-SiC nanowires, the band gaps increase (decrease) with tensile (compressive) strain. For 4H-and 6H-SiC nanowires the influence of strain on the band gaps is more pronounced in the thicker wires. Finally, we estimated the band offsets of hypotetical NW homostructures, composed by stacking SiCNW layers with different polytypes.