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
  body?: SchemaNode[];                    // Alternative content prop
  
  // Styling
  className?: string;                     // Tailwind CSS classes
  
  // Base properties
  id?: string;
  visible?: boolean | string;
  testId?: string;
}

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