In the UK, an employee can't legally walk off the job without notice but it does happen albeit rarely. Nobody ever sues them. The only reason people don't do it more often is so they have a reference for their next employment.
The more common way to do this these days is to feign an illness like stress and get signed off work, paid, by the doctor, then quit later.