Both are possible, but which one to use depends on context.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
He slammed his fist into the pillow.
He slammed the door with the force of his whole body.