Skip to content

How to change the default max-width for Container? #2490

Answered by segunadebayo
sjaakbanaan asked this question in Q&A
Discussion options

You must be logged in to vote

You need to extend the container pattern and create your own transform

Here's an example from Park UI.

defineConfig({
  patterns: {
    extend: {
      container: {
        transform(props) {
          return {
            position: 'relative',
            width: '100%',
            mx: 'auto',
            px: { base: '4', md: '6' },
            maxWidth: '<INSERT_VALUE>'
            ...props,
          }
        },
      },
    },
  }})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sjaakbanaan
Comment options

Answer selected by segunadebayo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants