The Front-End
CSS Frameworks
Semantic UI
Introduction

Introduction to Semantic UI

Semantic UI is a modern front-end framework that focuses on semantic HTML and modularity. It provides a set of themable components and styles, making it easy to create responsive and visually appealing user interfaces. Let's delve into the philosophy and modularity of Semantic UI, explore its key features, and provide useful examples.

Philosophy and Modularity:

- Semantic HTML:

Semantic UI follows the philosophy of using semantic HTML, where the markup reflects the meaning and structure of the content. This enhances readability, accessibility, and maintainability.

<div class="ui message">
  <div class="header">Welcome to Semantic UI</div>
  <p>This is a sample message.</p>
</div>

In the example above, the structure of the message is expressed semantically with a header and paragraph.

- Modularity:

Semantic UI is designed with modularity in mind. Components are independent and can be combined to create complex layouts. This modular approach promotes code reuse and flexibility.

<div class="ui grid">
  <div class="four wide column">
    <!-- Sidebar content -->
  </div>
  <div class="twelve wide column">
    <!-- Main content -->
  </div>
</div>

Here, the grid system is used to create a layout with a sidebar and main content area.

Key Features:

1. Responsive Design:

Semantic UI provides a responsive grid system and responsive utility classes to create layouts that adapt to different screen sizes.

<div class="ui stackable three column grid">
  <div class="column">
    <!-- Content for the first column -->
  </div>
  <div class="column">
    <!-- Content for the second column -->
  </div>
  <div class="column">
    <!-- Content for the third column -->
  </div>
</div>

2. Theming and Customization:

Semantic UI allows easy theming and customization. You can use predefined themes or create your own, ensuring consistency with your brand.

<div class="ui blue message">
  <!-- Blue-themed message -->
</div>

3. Rich Set of Components:

Semantic UI includes a variety of components such as buttons, forms, menus, and modals. These components are designed to be expressive and easily customizable.

<div class="ui button">Click me</div>

4. Extensive Documentation:

Semantic UI provides comprehensive documentation with examples and explanations. This makes it easy for developers to understand and implement its features.

Semantic UI Documentation (opens in a new tab)

5. Community and Ecosystem:

Semantic UI has an active community and ecosystem. It is integrated with popular JavaScript frameworks like React and Vue, and there are additional themes and plugins created by the community.

<div class="ui accordion">
  <!-- Accordion component -->
  <div class="title">
    <i class="dropdown icon"></i>
    What is Semantic UI?
  </div>
  <div class="content">
    <p>Semantic UI is a user interface framework designed for theming.</p>
  </div>
</div>

Semantic UI's focus on semantic HTML, modularity, and theming makes it a powerful tool for front-end development. By utilizing its components and adhering to its philosophy, developers can create consistent, responsive, and visually appealing user interfaces.