Semantic-UI
Semantic is a UI component framework based around useful principles from natural language.
Top Related Projects
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
A utility-first CSS framework for rapid UI development.
The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
Modern CSS framework based on Flexbox
A lightweight and modular front-end framework for developing fast and powerful web interfaces
Materialize, a CSS Framework based on Material Design
Quick Overview
Semantic UI is a development framework that helps create beautiful, responsive layouts using human-friendly HTML. It integrates with popular web frameworks and provides a comprehensive set of UI components and themes. Semantic UI aims to make front-end development more intuitive and efficient.
Pros
- Extensive collection of pre-built UI components and modules
- Highly customizable with a theming system
- Responsive design out of the box
- Clear and intuitive naming conventions
Cons
- Steeper learning curve compared to some other UI frameworks
- Large file size if using the full framework
- Less frequent updates compared to some competitors
- Some users report performance issues with certain components
Code Examples
- Creating a basic button:
<button class="ui button">
Click me
</button>
- Implementing a dropdown menu:
<div class="ui dropdown">
<div class="text">File</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item">New</div>
<div class="item">Open...</div>
<div class="item">Save</div>
</div>
</div>
- Adding a modal dialog:
<div class="ui modal">
<i class="close icon"></i>
<div class="header">
Modal Title
</div>
<div class="content">
<p>Modal content goes here.</p>
</div>
<div class="actions">
<div class="ui approve button">Approve</div>
<div class="ui cancel button">Cancel</div>
</div>
</div>
Getting Started
To start using Semantic UI, include the following CSS and JavaScript files in your HTML:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
Then, you can start using Semantic UI classes in your HTML elements:
<div class="ui container">
<h1 class="ui header">Welcome to Semantic UI</h1>
<p>Start building your UI with Semantic classes!</p>
</div>
Competitor Comparisons
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
Pros of Bootstrap
- Larger community and more extensive documentation
- More frequent updates and better long-term support
- Wider range of pre-built components and templates
Cons of Bootstrap
- Heavier file size, potentially impacting page load times
- Less intuitive class naming convention
- More opinionated design, which can be harder to customize
Code Comparison
Bootstrap:
<div class="container">
<div class="row">
<div class="col-md-4">Column 1</div>
<div class="col-md-4">Column 2</div>
<div class="col-md-4">Column 3</div>
</div>
</div>
Semantic UI:
<div class="ui grid container">
<div class="four wide column">Column 1</div>
<div class="four wide column">Column 2</div>
<div class="four wide column">Column 3</div>
</div>
Both frameworks offer grid systems, but Semantic UI's class names are more intuitive and readable. Bootstrap uses a 12-column system with breakpoints, while Semantic UI uses a 16-column system with more straightforward width declarations. Semantic UI's approach may be easier for beginners to understand and implement, but Bootstrap's system offers more flexibility for complex layouts across different screen sizes.
A utility-first CSS framework for rapid UI development.
Pros of Tailwind CSS
- Highly customizable and flexible, allowing for more granular control over styling
- Smaller file size and better performance due to its utility-first approach
- Easier to maintain and scale large projects with consistent design patterns
Cons of Tailwind CSS
- Steeper learning curve for developers new to utility-first CSS frameworks
- Can lead to longer class names and potentially cluttered HTML markup
- Requires additional configuration for custom designs beyond the default utility classes
Code Comparison
Semantic UI:
<button class="ui primary button">
Click me
</button>
Tailwind CSS:
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
Click me
</button>
Both Semantic UI and Tailwind CSS are popular CSS frameworks, but they follow different philosophies. Semantic UI provides pre-designed components with semantic class names, making it easier for beginners to create consistent UI elements quickly. Tailwind CSS, on the other hand, offers a utility-first approach that gives developers more control over the design but requires more initial setup and learning. The choice between the two depends on project requirements, team expertise, and personal preferences.
The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
Pros of Foundation
- More customizable and flexible, allowing for greater control over design
- Extensive documentation and community support
- Better accessibility features out-of-the-box
Cons of Foundation
- Steeper learning curve, especially for beginners
- Larger file size, which may impact page load times
- Less intuitive class naming conventions compared to Semantic UI
Code Comparison
Foundation:
<div class="grid-x grid-margin-x">
<div class="cell small-6 medium-4 large-3">Content</div>
<div class="cell small-6 medium-4 large-3">Content</div>
</div>
Semantic UI:
<div class="ui two column stackable grid">
<div class="column">Content</div>
<div class="column">Content</div>
</div>
Foundation uses a more explicit grid system with specific size classes, while Semantic UI opts for a simpler, more intuitive approach. Foundation's code is more verbose but offers finer control over responsive behavior.
Modern CSS framework based on Flexbox
Pros of Bulma
- Lightweight and modular, allowing for easy customization and smaller file sizes
- Built with Flexbox, providing better responsiveness and layout control
- Simple and intuitive class naming convention, making it easier to learn and use
Cons of Bulma
- Less comprehensive component library compared to Semantic UI
- Fewer pre-built themes and customization options out of the box
- Limited JavaScript functionality, requiring additional libraries for interactive components
Code Comparison
Bulma:
<div class="columns">
<div class="column">
<div class="card">
<div class="card-content">
<p class="title">Card Title</p>
<p class="subtitle">Card Subtitle</p>
</div>
</div>
</div>
</div>
Semantic UI:
<div class="ui grid">
<div class="column">
<div class="ui card">
<div class="content">
<div class="header">Card Title</div>
<div class="meta">Card Subtitle</div>
</div>
</div>
</div>
</div>
Both frameworks offer clean and readable syntax for creating responsive layouts and components. Bulma uses more descriptive class names, while Semantic UI opts for a more semantic approach. Bulma's code tends to be slightly more concise due to its focus on CSS-only components.
A lightweight and modular front-end framework for developing fast and powerful web interfaces
Pros of UIkit
- Lightweight and modular, allowing for smaller file sizes and faster load times
- Extensive documentation with interactive examples
- More frequent updates and active community support
Cons of UIkit
- Less intuitive class naming convention compared to Semantic UI
- Fewer pre-built components and themes available out-of-the-box
- Steeper learning curve for developers new to the framework
Code Comparison
Semantic UI button example:
<button class="ui primary button">
Save
</button>
UIkit button example:
<button class="uk-button uk-button-primary">
Save
</button>
Both frameworks offer similar functionality, but Semantic UI's class naming is more intuitive and self-explanatory. UIkit uses a prefix (uk-
) for all its classes, which can make the code slightly more verbose.
In terms of customization, both frameworks allow for easy theming and modification. However, Semantic UI's theming system is more comprehensive and easier to use for beginners.
Overall, UIkit is a solid choice for developers who prioritize performance and modularity, while Semantic UI excels in ease of use and intuitive design. The choice between the two often comes down to personal preference and project requirements.
Materialize, a CSS Framework based on Material Design
Pros of Materialize
- Lighter weight and faster loading times
- More modern, Google Material Design-inspired aesthetics
- Easier learning curve for beginners
Cons of Materialize
- Less extensive component library compared to Semantic UI
- Fewer customization options and theming capabilities
- Less active community and slower development cycle
Code Comparison
Materialize button:
<a class="waves-effect waves-light btn">Button</a>
Semantic UI button:
<button class="ui button">Button</button>
Materialize uses more specific class names that describe the visual effect, while Semantic UI opts for a more generic, semantic approach to naming conventions.
Both frameworks offer responsive grid systems, but their implementations differ:
Materialize grid:
<div class="row">
<div class="col s12 m6 l4">Content</div>
</div>
Semantic UI grid:
<div class="ui grid">
<div class="sixteen wide mobile six wide tablet four wide computer column">Content</div>
</div>
Materialize uses a simpler class naming system for its grid, while Semantic UI provides more verbose but potentially more flexible options for responsive design.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Semantic UI
Semantic is a UI framework designed for theming.
Key Features
- 50+ UI elements
- 3000 + CSS variables
- 3 Levels of variable inheritance (similar to SublimeText)
- Built with EM values for responsive design
- Flexbox friendly
Semantic allows developers to build beautiful websites fast, with concise HTML, intuitive javascript, and simplified debugging, helping make front-end development a delightful experience. Semantic is responsively designed allowing your website to scale on multiple devices. Semantic is production ready and partnered with frameworks such as React, Angular, Meteor, and Ember, which means you can integrate it with any of these frameworks to organize your UI layer alongside your application logic.
2.5.0 Release (Oct 6, 2022)
Semantic UI is now compatible with Node 18 and Gulp 4.
User Support
Please help us keep the issue tracker organized. For technical questions that do not include a specific JSFiddle test case (bug reports), or feature request please use StackOverflow to find a solution.
Visit our contributing guide for more on what should be posted to GitHub Issues.
Install
Recommended Install
npm install semantic-ui # Use themes, import build/watch tasks into your own gulpfile.
Semantic UI includes an interactive installer to help setup your project.
- For more details on setup visit our getting started guide.
- To learn more about theming please read our theming guide
Additional Versions
Environment | Install Script | Repo |
---|---|---|
CSS Only | npm install semantic-ui-css | CSS Repo |
LESS Only | npm install semantic-ui-less | LESS Repo |
LESS plugin | npm install less-plugin-semantic-ui | LESS Plugin Repo |
EmberJS | ember install:addon semantic-ui-ember | Ember Repo |
Meteor - LESS | meteor add semantic:ui | Meteor Repo |
Meteor - CSS | meteor add semantic:ui-css | CSS Repo |
Bower | bower install semantic-ui |
Check out our integration wiki for more options.
Browser Support
- Last 2 Versions FF, Chrome, Safari Mac
- IE 11+
- Android 4.4+, Chrome for Android 44+
- iOS Safari 7+
- Microsoft Edge 12+
Although some components will work in IE9, grids and other flexbox components are not supported by IE9 and may not appear correctly.
Community
Getting Help
Please do not post usage questions to GitHub Issues. For these types of questions use our Gitter chatroom or StackOverflow.
Submitting Bugs and Enhancements
GitHub Issues is for suggesting enhancements and reporting bugs. Before submiting a bug make sure you do the following:
- Check out our contributing guide for info on our release cycle.
- Fork this boilerplate JSFiddle to create a test case for your bug. If a bug is apparent in the docs, that's ok as a test case, just make it clear exactly how to reproduce the issue. Only bugs that include a test case can be triaged.
Pull Requests
When adding pull requests, be sure to merge into the next branch. If you need to demonstrate a fix in next
release, you can use this JSFiddle
International
- Chinese A Chinese mirror site is available at http://www.semantic-ui.cn.
- Right-to-Left (RTL) An RTL version can be created using our build tools by selecting
rtl
from the install script. - Translation To help translate see the Wiki Guide for translations.
Resources
Resource | Description |
---|---|
Bugs & Feature Requests | All bug submission require a link to a test case, and a set of steps to reproduce the issue. You can make a test case by forking this JSFiddle, then submit your bug report on GitHub Issues |
Live Chat | Join our Gitter.im Room |
Newsletter Updates | Sign up for updates at semantic-ui.com |
Additional Resources | Submit a question on StackOverflow or ask our Google Group |
Places to Help
Project | How To Help | Next Step |
---|---|---|
Localization | Help us translate Semantic UI into your language | Join our Translation Community |
SCSS | SASS needs PR to support variables inside @import | Add Pull Request for #739 |
Angular | Help develop angular bindings | Reach Out on GitHub Issues |
Guides & Tutorials | Help write guides and tutorials | Join the discussion |
Reaching Out
If you'd like to start a conversation about Semantic feel free to e-mail me at jack@semantic-ui.com
Top Related Projects
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
A utility-first CSS framework for rapid UI development.
The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
Modern CSS framework based on Flexbox
A lightweight and modular front-end framework for developing fast and powerful web interfaces
Materialize, a CSS Framework based on Material Design
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot