An electronic device with retractable stylus. The electronic device comprises a main body and a stylus. The stylus comprises a resilient member disposed therein and a latching mechanism for engaging the main body. To connect the stylus and the main body, the resilient member is deformed and the latching mechanism is engaged with the main body. When the latching mechanism separates from the main body, the resilient member exerts force to extend the stylus to make the stylus protruded from the main body.
Embodiments of a pen/stylus apparatus are disclosed. In one embodiment, among others, a pen/stylus apparatus comprises a chamber configured to receive a pen, a holding element having a shaft, the holding element configured to retain the pen in a partially-ejected position, a button having a retainer, the retainer configured to retain the shaft when the pen is completely-inserted in the chamber, and a biasing element adjacent to the holding element, the biasing element configured to eject the holding element to a position corresponding to the partially-ejected position of the pen when the retainer is released from the shaft.