JSFiddle - React, Tailwind, and code Playground

HTML

<div>Test
    case</div>

CSS

div {
    white-space: pre;
}