The ground state structural, electronic and mechanical properties of Cr2AlX (X=C, N and B) ceramics have been investigated by first-principles density functional pseudopotential plane-wave calculations with and without spin-polarization effects. Especially, the effects of substitutional boron atoms on the structure and properties of Cr2AlC have been discussed in detail for the first time. All of the compounds, including newly presented Cr2AlB are energetically and mechanically stable. From spin-polarized first-principles calculations, it is interestingly concluded that the ground states of Cr2AlX (X=C, N and B) compounds should have magnetic character, and this assertion is supported that the theoretical results obtained from spin-polarized calculations are in excellent agreement with the experiment. Furthermore, the bonding, partial and total magnetic characteristics are explored in detail, by means of partial and total spin density of states, Mulliken atomic charges and bond overlap populations, and 2D electron density maps. Additionally, the elastic and mechanical properties are studied. And, theoretical hardnesses of Cr2AlX (X=C, N and B) compounds are calculated, and it observed that the metallicity of the compounds plays an important role on the hardness.