How to install and use semantic-ui-react

I want to create a web client using act.js and a semantic interface. There is a package of nodes for using semantic-ui withact.js; semantic interface is responsive . I already installed this package on my computer, following the instructions at response.semantic-ui.com/usage , but after testing with a simple web page.

I think I have this problem, because I could not use this last statement: import '.../semantic/dist/semantic.min.css';, semanticfolder has been generated in the master of my project folder, but the folder distand semantic.min.cssdo not yet exist. Where and how should I use it?

NB. I also tried adding this <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css"></link>to my Page index.htmland the page was styled as expected. I do not want to use this option, since I cannot change them with it.

+5
source share
4 answers

Install css first npm install semantic-ui-css --save
Then import on the index.js page (top level)
 import 'semantic-ui-css/semantic.min.css';

+15
source

First, use one of the package managers below to install the semantic user interface response package.

For npm users:

npm install semantic-ui-react

For yarn users:

yarn add semantic-ui-react

Then add this import line to your index.js

import 'semantic-ui-css/semantic.min.css'

All this.

, :
http://videotutorialspot.com/2019/01/08/semantic-ui-for-react-install-and-getting-started/

+2
npm install sematic-ui-react sematic-ui-css --save
0
source

For npm user:

npm i semantic-ui-react semantic-ui-css
0
source

Source: https://habr.com/ru/post/1661930/


All Articles