The Semantic UI React package can be installed via Yarn:
The method you choose to include the stylesheet in your project will depend on the level of customisation you require.
For examples on how to import and use Semantic UI React components, click the code icon next to any example. Here are a few direct links:
You can use the default Semantic UI stylesheet by including a Semantic UI CDN link in your index.html file.
This is the quickest way to get started with Semantic UI React. You won't be able to use custom themes with this method.
The Semantic UI CSS package is automatically synced with the main Semantic UI repository to provide a lightweight CSS only version of Semantic UI.
Semantic UI CSS can be installed as a package in your project using Yarn. You won't be able to use custom themes with this method.
sh
After install, you'll need to include the minified CSS file in your index.js file:
jsx
Install the full Semantic UI package.
Semantic UI includes Gulp build tools so your project can preserve its own theme changes, allowing you to customise the style variables.
Detailed documentation on theming in Semantic UI is provided here.
sh
After building the project with Gulp, you'll need to include the minified CSS file in your index.js file:
jsx
Semantic UI React is fully supported by all modern JavaScript bundlers. We made some example recipes with some of them. You can use them as start point for your projects.
Webpack 2/3 fully supports Semantic UI React, it also supports Tree Shaking. Please ensure that you
build your app in production mode before release, it will strip propTypes
from your build.
Webpack 4 fully supports Semantic UI React, it also fully supports Tree Shaking. Please
ensure that you build your app in production mode before release, it will strip propTypes
from your build.
Please ensure that you're using [email protected]
or higher because we added the
sideEffects
option in this release.