Last modified: 16 July, 2025
In short yes, nextjs layout components can be client components. Next's layout and page components are nothing but react components. So they follow all the rules of react components.
As next's layout and page components are nothing but react components, all the rules for RSC apply to them as well. One of them, that you should keep in mind is: children of client components can be server components. They are not magically made client components. If you include a "use client" directive in a layout.tsx
file, the layout component will become a client component. But it does not mean all its children will be client component as well.
Although, it is possible to make layout components (including the root layout component), a client component, it makes little sense to do it. Some of the implication are listed below.
cookies()
or headers()
from next/headers
) directly. You can't export metadata
or generateMetadata()
either.Layouts are server components by default. Next's layout components are nothing but react components and they follow all the rules of react components. All components are server components unless you explicitly add a "use client" directive. If you provide the "use client", then, the component becomes a client component.