### `width`, `initialScale`, `maximumScale` and 'userScalable'
### `width`, `initialScale`, `maximumScale` and `userScalable`
> **Good to know**: The `viewport` meta tag is automatically set with the following default values. Usually, manual configuration is unnecessary as the default is sufficient. However, the information is provided for completeness.
> **Good to know**: The `viewport` meta tag is automatically set with the following default values. Usually, manual configuration is unnecessary as the default is sufficient. However, the information is provided for completeness.
```jsx filename="layout.js | page.js"
```tsx filename="layout.tsx | page.tsx" switcher
import type { Viewport } from 'next'
export const viewport: Viewport = {
width: 'device-width',
initialScale: 1,
maximumScale: 1,
userScalable: 'no',
// Also supported by less commonly used
// interactiveWidget: 'resizes-visual',
}
```
```jsx filename="layout.jsx | page.jsx" switcher
export const viewport = {
export const viewport = {
width: 'device-width',
width: 'device-width',
initialScale: 1,
initialScale: 1,
maximumScale: 1,
maximumScale: 1,
userScalable: 1,
userScalable: 'no',
// Also supported by less commonly used
// Also supported by less commonly used
// interactiveWidget: 'resizes-visual',
// interactiveWidget: 'resizes-visual',
}
}
...
@@ -123,7 +155,15 @@ export const viewport = {
...
@@ -123,7 +155,15 @@ export const viewport = {
Learn more about [`color-scheme`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name#:~:text=color%2Dscheme%3A%20specifies,of%20the%20following%3A).
Learn more about [`color-scheme`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name#:~:text=color%2Dscheme%3A%20specifies,of%20the%20following%3A).