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