Compared to many rigid robots, emerging soft robots possess higher adaptability and safety owing to their compliance, [1,2] making them a promising solution for human-robot interaction, [3,4] manipulation, [5,6] and search and rescue. [7] Instead of only having one state (soft or rigid) in a robot, many scenarios necessitate both soft and rigid properties. For example, when picking an item of varying softness, shape, and weight using various motions, such as grasping and fiddling, a packaging robot should be rigid enough to grasp heavy items but soft enough to grasp fragile or irregular items while also being capable of quickly switching between these two states. [2,8,9] While exploring dangerous and confined environments (e.g., post-earthquake rescue and industrial pipeline inspection), the robot should be sufficiently compliant to adapt to the cluttered environment and rigid to transport a large gap. [10,11] Moreover, if a robot approaches a rugged surface with a heavy payload, it should be sufficiently compliant to move on the surface and rigid to support the payload. [12,13] To circumvent this problem, researchers attempted to integrate rigid and soft robots. One approach is to convert a robot from a rigid to a soft state and vice versa, which requires a variable-stiffness mechanism. This mechanism has been widely used in wearable robots, [14] manipulators, [7,15] and continuum