# Semantic UI

**Semantic UI** 是一个开源前端开发框架，于2013年发布，通过人性化、描述性的HTML类名为网站和Web应用提供预构建的用户界面组件，并配备一套由变量驱动的主题系统。<sup>[1](https://pkgsearch.dev/semantic-ui)</sup> 该框架由杰克·卢基奇（Jack Lukic）创建，首个预发布版本 Semantic UI 0.1.0 于2013年9月面世。<sup>[2](https://www.theseus.fi/bitstream/handle/10024/161309/Suman%20Aryal.pdf?sequence=2)</sup><sup> • </sup><sup>[3](https://anken-hyouban.com/blog/2021/11/01/semantic-ui/)</sup> 框架在MIT许可证下免费使用。<sup>[1](https://pkgsearch.dev/semantic-ui)</sup>

| 关键信息 | 详情 |
|---|---|
| 创建者与首次发布 | 杰克·卢基奇；首个预发布版（0.1.0）2013年9月<sup>[2](https://www.theseus.fi/bitstream/handle/10024/161309/Suman%20Aryal.pdf?sequence=2)</sup><sup> • </sup><sup>[3](https://anken-hyouban.com/blog/2021/11/01/semantic-ui/)</sup> |
| 许可证 | MIT，商业与个人项目均可免费使用<sup>[1](https://pkgsearch.dev/semantic-ui)</sup> |
| 技术 | LESS样式表配合基于jQuery的JavaScript行为；需要jQuery 1.8或更高版本<sup>[4](https://www.drupal.org/project/semanticui)</sup> |
| 主题定制 | 三级变量继承（默认、打包主题、站点主题），通过 `theme.config` 文件管理<sup>[5](https://semantic-ui.com/usage/theming.html)</sup> |
| 组件分组 | 元素、集合、视图、模块，以及API、表单验证、可见性等行为<sup>[6](https://semantic-ui.com/introduction/getting-started.html)</sup> |
| React集成 | Semantic UI React，官方React集成，其自身API不依赖jQuery<sup>[7](https://react.semantic-ui.com/)</sup> |
| 社区分支 | Fomantic-UI，为延续活跃开发而创建的社区分支<sup>[8](https://github.com/fomantic/fomantic-ui)</sup> |

## 历史与版本

Semantic UI 最初于2013年9月以GitHub预发布版的形式出现，并于2014年11月发布首个稳定版本1.0版。<sup>[2](https://www.theseus.fi/bitstream/handle/10024/161309/Suman%20Aryal.pdf?sequence=2)</sup><sup> • </sup><sup>[9](https://thelinuxcode.com/the-complete-guide-to-semantic-ui/)</sup> 此后的里程碑包括：2015年6月的2.0版，引入新的默认主题；2016年9月的2.2版，加入官方React集成；2017年12月的2.3版，改进自定义工具；2019年10月的2.4版，提供Bootstrap迁移辅助工具。<sup>[9](https://thelinuxcode.com/the-complete-guide-to-semantic-ui/)</sup> GitHub发布页面显示2.3.3版的日期为2018年7月8日。<sup>[10](https://github.com/Semantic-Org/Semantic-UI/releases)</sup>

原仓库的开发逐渐放缓，社区遂组建了 **Fomantic-UI**，其仓库自述为Semantic-UI的官方社区分支，旨在延续活跃开发，并表示最终意图是合并回主仓库。<sup>[8](https://github.com/fomantic/fomantic-ui)</sup> Fomantic 2.9包含200多项新功能、改进和错误修复，并新增了结合模态框与侧边栏行为的Flyout组件。<sup>[11](https://fomantic-ui.com/introduction/new.html)</sup> Fomantic分发纯CSS、LESS和SASS三种包，其文档标注的浏览器支持起点为Chrome 88、Edge 88、Safari 14.1和Firefox 82。<sup>[8](https://github.com/fomantic/fomantic-ui)</sup>

另有一个独立的改写版本，文档位于 next.semantic-ui.com，将Semantic UI重新构想为编写标准W3C Web组件的框架，这些组件可在现代浏览器中原生运行，并与React、Vue和Angular集成。该版本在 `@semantic-ui/core` 包中提供预构建组件，由若干独立核心库构建而成，包括 `@semantic-ui/query`、`@semantic-ui/reactivity`、`@semantic-ui/templating` 和 `@semantic-ui/utils`，采用基于信号的响应式机制，并配有用于深色与浅色主题的CSS令牌框架。<sup>[12](https://next.semantic-ui.com/introduction)</sup>

## 设计与组件

该框架的显著特色是使用自然语言类名。按钮的标记为 `ui button`，组件会被赋予特殊类名 `ui`，以区分完整组件与其组成部分，从而提供一个限定CSS规则作用范围的命名空间；例如，列表项只获得 `item` 类，而列表本身获得 `ui list`。<sup>[13](https://semantic-ui.com/introduction/glossary.html)</sup>

Semantic UI 将其定义划分为若干组。*定义*是描述组件本质属性的一组CSS和[JavaScript](https://www.edgepedia.org/zh/javascript)，以变量编写，使主题能够改变外观。*视图*是呈现评论、动态或卡片等内容类型的约定。*模块*结合外观与行为，包括手风琴、下拉菜单和弹出框。*行为*是独立的JavaScript组件，描述元素如何动作而不定义外观，涵盖表单验证、状态管理和API请求路由。<sup>[13](https://semantic-ui.com/introduction/glossary.html)</sup> 文档中的组件目录涵盖元素（如按钮、输入框、标签）、集合（如表单、网格、菜单、表格）、视图（如卡片、统计）、模块（如模态框、弹出框、下拉菜单）以及行为（如API、表单验证、可见性）。<sup>[6](https://semantic-ui.com/introduction/getting-started.html)</sup>

API行为将服务器请求与UI状态自动绑定：输入框在 `oninput` 时触发查询，按钮在 `onclick` 时触发，表单在 `onsubmit` 时触发，而 `get followers` 这类具名动作可替代应用代码中硬编码的URL。<sup>[14](https://semantic-ui.com/behaviors/api.html)</sup> JavaScript模块遵循统一的设计模式，并向控制台提供运行时调试输出，描述各组件运行时的行为。<sup>[15](https://legacy.semantic-ui.com/module.html)</sup>

## 主题定制

主题定制是该框架的核心设计理念。开发者无需从零开始构建组件，只需用CSS变量指定其组件与默认主题的差异，文档将这一做法与弗雷德里克·布鲁克斯（Frederick Brooks）《设计的设计》（*The Design of Design*）中的*渐进式真实性*概念相关联。默认主题使用开源的Lato无衬线字体。<sup>[5](https://semantic-ui.com/usage/theming.html)</sup>

主题由两类文件组成：`.variables` 文件只需包含该主题有差异的变量；`.overrides` 文件添加CSS规则，并可访问组件的全部继承变量。<sup>[5](https://semantic-ui.com/usage/theming.html)</sup> 变量继承分为三个逐级具体的层次：提供基线变量的默认主题、按组件选择的打包主题，以及叠加在所有其他主题之上的站点主题，类似于[WordPress](https://www.edgepedia.org/zh/wordpress)中的子主题。<sup>[5](https://semantic-ui.com/usage/theming.html)</sup> `theme.config` 文件控制每个组件使用哪个打包主题，因此项目可以混搭主题，例如GitHub风格的按钮配material风格的菜单。<sup>[5](https://semantic-ui.com/usage/theming.html)</sup>

全局颜色变量采用更高层级的抽象，使得更改一个调色板即可自动调整派生状态：悬停、激活和聚焦色调通过修改基础颜色变量的饱和度和亮度生成。框架定义了十二种具名颜色，包括红、橙、黄、橄榄、绿、青、蓝、紫罗兰、紫、粉、棕和灰，带颜色变体的组件会继承这些颜色。<sup>[5](https://semantic-ui.com/usage/theming.html)</sup>

构建系统使用Gulp，仅编译项目所需的组件及其主题化CSS和JavaScript；对于只需要默认主题的项目，可使用更轻量的 `semantic-ui-css` 和 `semantic-ui-less` 包。<sup>[6](https://semantic-ui.com/introduction/getting-started.html)</sup> LESS包可以不经Gulp而适配到Webpack等打包工具，但需要额外的Webpack配置；Semantic UI React自身不含样式，完全依赖这套主题系统。<sup>[16](https://react.semantic-ui.com/theming/)</sup>

## 集成

**Semantic UI React** 是官方React集成，提供声明式API，组件特性与属性可组合使用，无需额外嵌套组件。<sup>[7](https://react.semantic-ui.com/)</sup> CSS包与Semantic UI主仓库自动同步，提供轻量的纯CSS版本，该库受现代JavaScript打包工具支持。<sup>[17](https://react.semantic-ui.com/usage/)</sup> 其他平台也曾有社区集成，包括一个打包该库并要求jQuery 1.8或更高版本的[Drupal](https://www.edgepedia.org/zh/drupal)主题。<sup>[4](https://www.drupal.org/project/semanticui)</sup>

## 评价与比较

Semantic UI 常被与Bootstrap和Foundation相比较。FAUN.dev 2026年的一项对比按11项标准评分，包括易用性、组件覆盖度、可访问性和打包体积，Bootstrap得84/100，Semantic UI得58/100。<sup>[18](https://faun.dev/toolbox/bootstrap-vs-semantic-ui/)</sup> 有评论指出，Semantic UI缺少Bootstrap提供的工具类，但仍是一个全面的CSS框架，并且提供了一些其他框架没有的组件。<sup>[19](https://www.saashub.com/compare-foundation-vs-semantic-ui)</sup> 一份2010年代的论文对比记录，写作时Semantic UI有44,040个GitHub星标和4,707个复刻，并指出，与Bootstrap不同，使用Semantic UI时，掌握JavaScript技能会有所帮助。<sup>[2](https://www.theseus.fi/bitstream/handle/10024/161309/Suman%20Aryal.pdf?sequence=2)</sup><sup> • </sup><sup>[20](https://fenix.tecnico.ulisboa.pt/downloadFile/1689244997260549/summary_final.pdf)</sup>

## References

1. [Semantic UI – Open-Source UI Framework for Thematic Design, pkgsearch](https://pkgsearch.dev/semantic-ui)
2. [Suman Aryal, thesis comparing front-end frameworks, Turku University of Applied Sciences](https://www.theseus.fi/bitstream/handle/10024/161309/Suman%20Aryal.pdf?sequence=2)
3. [Semantic UIを理解する！案件評判 (first pre-release 0.1.0, September 2013)](https://anken-hyouban.com/blog/2021/11/01/semantic-ui/)
4. [Semantic UI theme project page, Drupal.org](https://www.drupal.org/project/semanticui)
5. [Theming, Semantic UI documentation](https://semantic-ui.com/usage/theming.html)
6. [Getting Started, Semantic UI documentation](https://semantic-ui.com/introduction/getting-started.html)
7. [Introduction, Semantic UI React](https://react.semantic-ui.com/)
8. [Fomantic/Fomantic-UI repository, GitHub](https://github.com/fomantic/fomantic-ui)
9. [The Complete Guide to Semantic UI, TheLinuxCode](https://thelinuxcode.com/the-complete-guide-to-semantic-ui/)
10. [Releases, Semantic-Org/Semantic-UI, GitHub](https://github.com/Semantic-Org/Semantic-UI/releases)
11. [What's New, Fomantic-UI Docs](https://fomantic-ui.com/introduction/new.html)
12. [Introduction, Semantic UI (next)](https://next.semantic-ui.com/introduction)
13. [Glossary, Semantic UI documentation](https://semantic-ui.com/introduction/glossary.html)
14. [API, Semantic UI documentation](https://semantic-ui.com/behaviors/api.html)
15. [UI Modules, Semantic UI legacy documentation](https://legacy.semantic-ui.com/module.html)
16. [Theming, Semantic UI React](https://react.semantic-ui.com/theming/)
17. [Get Started, Semantic UI React](https://react.semantic-ui.com/usage/)
18. [Bootstrap vs Semantic UI: CSS Frameworks Comparison (2026), FAUN.dev](https://faun.dev/toolbox/bootstrap-vs-semantic-ui/)
19. [Foundation vs Semantic UI comparison, SaaSHub](https://www.saashub.com/compare-foundation-vs-semantic-ui)
20. [Framework comparison summary, Técnico Lisboa](https://fenix.tecnico.ulisboa.pt/downloadFile/1689244997260549/summary_final.pdf)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Web development and web-platform technologies › CSS tooling and utility frameworks

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/semantic-ui

English original: https://www.edgepedia.org/semantic-ui
