Skip to content

Instantly share code, notes, and snippets.

@AryanBeezadhur
Last active Sep 30, 2021
Embed
What would you like to do?
Next.js Custom 404 page
export default function Custom404() {
return (
<div>
<h1>404</h1>
<p>This page could not be found.</p>
<style jsx>{`
div {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
text-align: center;
}
h1 {
padding-right: 1.25rem;
border-right: 2px solid;
font-size: var(--fs-2xl);
font-weight: var(--fw-semibold);
}
p {
padding-left: 1.25rem;
}
`}</style>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment