Patent attributes
An electronic device includes a body, a driven component, a first magnetic component and a second magnetic component. The driven component is slidably disposed in the body. The first magnetic component is disposed at the driven component. The second magnetic component is located at one side of the driven component, and the first magnetic component and the second magnetic component are disposed corresponding to each other. The second magnetic component is configured to generate a magnetic attraction force or a magnetic repulsion force to the first magnetic component, so as to position the driven component based on the magnetic attraction force or the magnetic repulsion force between the first magnetic component and the second magnetic component.