semantic-ui
  1. semantic-ui-rail

Semantic UI Rail

Semantic UI Rail is a component that provides a vertical sidebar typically used for navigation or additional content. It is positioned outside the main content area and can be attached to different sides of the page.

Syntax

<div class="ui rail">
  <!-- Content for the rail goes here -->
</div>

Example

<div class="ui right rail">
  <div class="ui segment">
    <p>Content for the right rail</p>
  </div>
</div>

Output

Semantic UI Rail Example

Explanation

  • The ui rail class is applied to create a rail container.
  • The right class specifies that the rail should be positioned on the right side of the page.
  • Inside the rail, you can include various content elements.

Use

Semantic UI Rail is often used for additional content such as navigation menus, social media links, or advertisements that should be easily accessible but not part of the main content flow.

Important Points

  • The rail can be positioned on the left or right side using the left or right class.
  • Additional classes like attached can be used to make the rail stick to the page content as the user scrolls.
  • The rail can be customized with various Semantic UI classes for styling and responsiveness.
<div class="ui left attached rail">
  <!-- Content for the left attached rail -->
</div>

Summary

Semantic UI Rail is a versatile component that allows you to add supplementary content to your page without cluttering the main content area. Whether it's navigation, ads, or additional information, the rail provides an organized and visually appealing way to present this content. Adjust the positioning and styling based on your specific design requirements.

Published on: