The present invention provides a button and an electronic device. [Solution] The button includes a housing and a motor, the motor is connected to the housing, the motor includes a base and a
magnetic circuit assembly, the base is formed with an
accommodation space, at least a part of the
magnetic circuit assembly is accommodated in the
accommodation space, the
magnetic circuit assembly includes at least a conductive cover plate, one
voice coil and one iron core, the conductive cover plate is located on one side of the base, the conductive cover plate is fixedly connected to the housing and movably connected to the base, the
voice coil and the iron core are accommodated in the
accommodation space and both are fixedly connected to the base, the
voice coil is fitted on the outside of the iron core, there is a predetermined gap between the iron core and the conductive cover plate along the thickness direction of the motor, and the voice coil and the iron core are used to drive the conductive cover plate to move the housing along the thickness direction of the motor. The button of the present invention can realize a feedback function to the user, and can easily confirm the user's operation, which is more advantageous to improve the accuracy of the user's operation and improve the user's experience.