How to animate a customizable pixel art platformer character?

I am working on a 2d platformer which is made up of pixel art. I want to make my character customizable like in stardew valley. How can I implement it and create animations for my game like run , idle ,etc.