PandaX is a large upgradable liquid-xenon detector system that can be used for both direct dark-matter detection and $^{136}$Xe double-beta decay search. It is located in the Jinping Deep-Underground Laboratory in Sichuan, China. The detector operates in dual-phase mode, allowing detection of both prompt scintillation, and ionization charge through proportional scintillation. The central time projection chamber will be staged, with the first stage accommodating a target mass of about 120,kg. In stage II, the target mass will be increased to about 0.5,ton. In the final stage, the detector can be upgraded to a multi-ton target mass. In this paper a detailed description of the stage-I detector design and performance results established during the commissioning phase is presented.