Entry to Slovakia is allowed to all persons fleeing the war in Ukraine.
At the moment,entry is possible for persons who do not have a valid travel document(biometric passport) as well. In such a case, it is necessary to apply for temporary refuge or asylum. If you are traveling with children, it is recommended that you have at least your child's birth certificate with you.
Persons without a valid passport are advised to carry other documents (e.g. ID card,driver's license, residence permit in Ukraine, birth certificates of children,etc.).
In the event that an unaccompanied child crosses the border, the competent authority shall, in cooperation with the police,coordinate the placement of the child in the selected facility.
From https://ua.gov.sk/en.html