Next.js Discord

Discord Forum

Iphone zooming issue

Answered
In&Out posted this in #help-forum
Open in Discord
Hey folks, i have input texts in my app, and they are often under 16px, so iphone zooms in on them, is it possible to remove that zooming feature? I tried this but it doesnt work
    <html lang="en" className={neueMontreal.variable} suppressHydrationWarning>
      <head>
        <ColorSchemeScript />
        <meta
          name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
        />
      </head>
      <body className="font-sans antialiased">
        <MantineProvider cssVariablesSelector="html">
          {children}
        </MantineProvider>
      </body>
    </html>
Answered by Huntaway
@In&Out I do this in my layout.tsx and it is what works for me.

export const viewport: Viewport = {
  width: 'device-width',
  initialScale: 1,
  maximumScale: 1,
  viewportFit: 'cover',
};
View full answer

3 Replies

Huntaway
@In&Out I do this in my layout.tsx and it is what works for me.

export const viewport: Viewport = {
  width: 'device-width',
  initialScale: 1,
  maximumScale: 1,
  viewportFit: 'cover',
};
Answer