Large language models (LLMs) have the potential to impact a wide range of creative domains, as exemplified by popular text-to-image generators such as DALL·E and Midjourney. However, the application of LLMs to motion-based visual design has not yet been explored and presents novel challenges, such as how users can effectively describe motion in natural language. Additionally, many existing generative design tools lack support for iterative refinement of designs beyond immediate engineering. In this article, we present Keyframer, a design tool that leverages the code generation capabilities of LLMs to support animation design exploration. Informed by interviews with motion designers, animators, and professional engineers, we designed Keyframer to support the ideation and refinement stages of animation design processes by allowing users to explore design variants throughout their process. We evaluated Keyframer with 13 users with a range of animation and programming experience, examining their cueing strategies and how they considered incorporating design variants into their process. We share a set of design principles for applying LLM to motion design prototyping tools and their potential implication for visual design tools in general.