Dev Helpers
← Back

Reading width layout

Place this file at app/studio/layout.tsx in an App Router project.

Open this example in the interactive library

Source code

// app/studio/layout.tsx

import type { ReactNode } from "react";

export default function ReadingWidthLayout({ children }: { children: ReactNode }) {
  return (
    <main
      style={{ width: "min(100% - 2rem,68ch)", marginInline: "auto", lineHeight: 1.7 }}
    >
      {children}
    </main>
  );
}