ObjectUIObjectUI

Semantic

Semantic HTML5 elements for structured content (header, nav, main, aside, section, article, footer)

Semantic components provide HTML5 semantic elements that give meaning to the structure of web content, improving accessibility and SEO.

Available Elements

ObjectUI provides semantic wrappers for these HTML5 elements:

  • header - Page or section header
  • nav - Navigation section
  • main - Main content area
  • aside - Sidebar or complementary content
  • section - Thematic grouping of content
  • article - Self-contained content
  • footer - Page or section footer

Basic Usage

Main Element

This is the main content area

Header

Site TitleNavigation

Navigation

Section and Article

Section

Section TitleA thematic grouping of content

Article

Article TitleSelf-contained content piece

Aside

Footer

© 2024 Company Name

Schema

// All semantic elements share the same schema structure
interface SemanticSchema {
  type: 'header' | 'nav' | 'main' | 'aside' | 'section' | 'article' | 'footer';
  
  // Content
  children?: SchemaNode | SchemaNode[];  // Child components — the only child-list key
  
  // Styling
  className?: string;                     // Tailwind CSS classes
  
  // Base properties
  id?: string;
  visible?: boolean | string;
  testId?: string;
}

children is the one child-list key: the renderer takes its child list from schema.children only. The body spelling was retired by objectui#6771 — schema validation refuses it with a pointer to children, and a body list renders nothing.

Examples

Page Layout

Complete Layout

My Website
Article TitleArticle content goes here...
Related ContentMore information...
© 2024 All rights reserved

Blog Post

Blog Article

Understanding Semantic HTMLPublished on January 15, 2024
IntroductionSemantic HTML provides meaning to the structure of web content...
Written by John Doe

On this page