Open this example in the interactive library
Live preview
Source code
// components/LinePreservingCaption.tsx
export default function LinePreservingCaption({
text = "Studio notes from the harbour",
}: { text?: string } = {}) {
return <p style={{ whiteSpace: "pre-line", overflowWrap: "anywhere" }}>{text}</p>;
}
