Container

src/components/container.tsx
import { clsx } from 'clsx'
export function Container({
className,
children,
align = 'wide',
maxWidth,
padding,
}: {
className?: string
children: React.ReactNode
align?: 'wide' | 'none' | 'content' | 'full' | 'navbar' | undefined
maxWidth?: string
padding?: string
}) {
const alignClasses = {
wide: 'max-w-2xl lg:max-w-7xl',
content: 'max-w-4xl',
none: '',
full: '',
navbar: 'max-w-[1740px]',
}
// Use maxWidth prop if provided, otherwise use alignClasses
const finalMaxWidth = maxWidth || alignClasses[align]
// Use padding prop if provided, otherwise use default (px-0 for full, px-6 lg:px-8 for others)
const defaultPadding = align === 'full' ? 'px-0' : 'px-6 lg:px-8'
const finalPadding = padding || defaultPadding
return (
<div className={clsx(className, finalPadding)}>
<div className={clsx('mx-auto', finalMaxWidth)}>{children}</div>
</div>
)
}

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC