ObjectUIObjectUI

Div (Deprecated)

Generic container element - use Shadcn components instead

⚠️ Deprecated Component

The Div component is deprecated. Please use Shadcn components instead:

  • For containers: use card, flex, or semantic layout components
  • For simple wrappers: use layout components like container, stack, or grid

The Div component is a generic container element. It is now deprecated in favor of semantic Shadcn-based components that provide better accessibility, consistency, and design system integration.

Migration Guide

Instead of using div, use these Shadcn alternatives:

For Card-like Containers → Use card

Use Card Instead

Card TitleCard content with proper semantic structure.

For Flex Layouts → Use flex

Flex Layout

For Grid Layouts → Use grid

Grid Layout

Old Examples (Deprecated)

Below are the old div examples. Please migrate to the alternatives shown above.

Schema

// ⚠️ DEPRECATED - Use Card, Flex, Grid, or other layout components instead
interface DivSchema {
  type: 'div';
  
  // Content
  children?: SchemaNode | SchemaNode[];  // Child components
  body?: SchemaNode[];                    // Alternative content prop
  
  // Styling
  className?: string;                     // Tailwind CSS classes
  
  // Base properties
  id?: string;
  visible?: boolean | string;
  testId?: string;
}

Legacy Examples (For Reference Only)

Old Card Layout Example

Custom Card

Card TitleCard description goes here. This is a basic card layout using div containers.

Nested Containers

Nested Divs

Nested Content

On this page