diff --git a/app/demo/container/page.tsx b/app/demo/container/page.tsx new file mode 100644 index 0000000..1f3d9dc --- /dev/null +++ b/app/demo/container/page.tsx @@ -0,0 +1,230 @@ +"use client"; + +import { Container } from "@/components/ui/container"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +export default function ContainerDemo() { + return ( +
+ Explore the different container variants and their responsive + behavior. +
+
+ Resize your browser to see responsive padding changes:
+
• Mobile: 16px padding
+
• Tablet (768px+): 32px padding
+
• Desktop (1024px+): 48px padding
+
+ This container is narrower, making it ideal for long-form text + content where line length should be limited for better + readability. +
++ This wider container provides more space for complex layouts + and side-by-side content arrangements. +
++ This container spans the full width of the viewport while + maintaining the responsive padding scale. Useful for hero + sections or full-bleed designs. +
+
+ When the prose
prop is enabled, the container applies
+ optimized typography styles for text content. This includes proper
+ line heights, spacing between elements, and font sizes that enhance
+ readability.
+
+ The prose variant is perfect for documentation, blog posts, or any + content where typography and readability are paramount. It + automatically styles: +
++++ “Good typography is invisible. Bad typography is + everywhere.” +
+
+ — Oliver Reichenstein +
+ Simply add the prose
prop to any container variant:
+
+ {`
+ Your Article Title
+ Your content here...
+ `}
+
+ + This container has additional vertical padding applied through + custom classes, demonstrating how you can extend the base styles + while maintaining the responsive behavior. +
++ Containers can be nested when you need different max-widths within + a section. This inner container has a narrow variant while the + outer uses the default width. +
+
+ The Container component supports the as
prop, allowing
+ you to render it as any HTML element. This example renders as an{" "}
+ <article>
+ element, improving semantic structure and accessibility.
+
Common use cases include:
+section
for page sections
+ article
for blog posts or articles
+ main
for main content areas
+ aside
for sidebars or related content
+ Content
+Test paragraph
+Test content
+Text content with optimized typography...
+ *