ObjectUIObjectUI

Container

Centered content container with max-width

Examples

Basic Container

Content inside container

Schema

interface ContainerSchema {
  type: 'container';
  children: SchemaNode[];
  // Max width constraint. `false` means NO maximum width, and it is rendered as
  // an explicit `max-w-none` — it cancels a max-width inherited from elsewhere
  // (the typography plugin's `prose`, for instance), which simply omitting the
  // class would not do.
  maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'
    | '7xl' | 'full' | 'screen' | false;   // default: 'xl'
  centered?: boolean;                       // default: true
  padding?: number;                         // 0, 1-8, 10, 12, 16 — default: 4
  className?: string;
}

On this page