Container
Container is part of the Layout and content group. Width-constrained layout wrapper for page sections.
Installation
Section titled “Installation”npx bambiui add container --framework reactnpx bambiui add container --framework solidnpx bambiui add container --framework sveltenpx bambiui add container --framework vueimport { Container } from "@/components/ui/container";
export function Example() { return <Container />;}import { Container } from "~/components/ui/container";
export function Example() { return <Container />;}<script lang="ts"> import { Container } from "$lib/components/ui/container";</script>
<Container /><script setup lang="ts">import { Container } from "@/components/ui/container";</script>
<template> <Container /></template>Preview
Section titled “Preview”
Container preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use to keep content readable and aligned across responsive layouts.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Container. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”ContainerTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-spacing--bambi-container-width