It is acceptable for a shower door to swing out or both in and out, but never just in. Building codes require that a shower door open outward, as a door that only opens inward can easily become blocked if the occupant falls.
Do be mindful when a shower door swings outward that there is enough clearance space when it is open. You will want enough room so that the shower door can be left open to allow it to dry between uses. If you have a shower door that also swings inward, it conveniently allows water to drip onto the shower’s surface rather than the floor.
Generously sized bathrooms are a perfect fit for a wide door that swings outward without hitting any obstructions. Smaller bathrooms may be better off with a shower door that swings inward, especially if an open door would hit a sink, vanity, or toilet going outward, or simply use a sliding shower door, which has no such concern at all and space-saving!