The structural, mechanical, and electronic properties of hypothetical XAlB4 (X = Li, Mg, Ca, and Na) compounds with YCrB4-type structure, which contains planar boron sheet as an important structural building block, are investigated by using first-principles density functional theory calculations with ultrasoft and norm-conserving pseudopotentials. Their thermodynamic, mechanic and dynamic stabilities, and thus existence of XAlB4 (X = Li, Mg, Ca, and Na) compounds with YCrB4-type structure are discussed. It is shown from calculated formation enthalpy values that all compounds are thermodynamically stable, except for the Na-incorporated compound. Among them, the Ca-incorporated compound has the lowest formation enthalpy, and consequently, it is more thermodynamically stable than the others. From the calculated single-crystal elastic constants, all compounds satisfy the mechanical stability conditions, and thus XAlB4 (X = Li, Mg, Ca and Na) compounds are mechanically stable. Furthermore, the electronic properties such as band structure and partial densities of states are studied. In addition, the bonding characteristics by means of Mulliken bond populations, atomic charges, 2D electron density maps, mechanical properties, brittle/ductile nature and anisotropic behaviors by means of the elastic constants, Cauchy pressure, bulk, shear, and Young's moduli, Poisson's ratio, and hardness are investigated. Especially, the effects of the planar boron sheet embedded in these compounds on their physical properties are discussed. Finally, for dynamical stability, phonon dispersion curves are calculated and the corresponding phonon modes at Gamma are mapped. (C) 2016 Elsevier B.V. All rights reserved.