Keycloak nodejs admin API for custom login

I am struggling with replacing default keycloak login/register page with custom react login/register page. So I was looking into nodejs admin APIs. So I want to know instead of default keycloak login/register if I register/login user via APIs then will there be any loop hole or any special case or precaution I need to take care of while implementing? Will this solve the problem of login/register user via API instead of default keycloak form?

The best way (IMO) to build a custom Keycloak login/register UI is with Keycloakify

They’ve done a lot of the messy/hard stuff for you, and the result deploys as a standard Keycloak theme.