Utopia UI is just a React component library. To run it locally while making changes to it, you need to link it to a React app that uses its components. For this purpose, it is recommended to clone the utopia-map
repository and link utopia-ui
inside of it. This guide explains how to set everything up.
-
Clone the
utopia-ui
repository:git clone https://github.com/utopia-os/utopia-ui.git cd utopia-ui
-
Install dependencies:
npm install
-
Build
utopia-ui
: Run the build script to prepareutopia-ui
for use:npm run build
-
Link
utopia-ui
globally: This makes the local version ofutopia-ui
available to be linked into other projects:npm link
-
Clone the
utopia-map
repository:git clone https://github.com/utopia-os/utopia-map.git cd utopia-map
-
Install dependencies:
npm install
-
Link
utopia-ui
intoutopia-map
: Usenpm link
to connect your localutopia-ui
instance toutopia-map
:npm link utopia-ui
-
Start the development environment: Run the local development environment for
utopia-map
to test changes inutopia-ui
:npm run dev
While working on utopia-ui
, any changes you make need to be reflected in utopia-map
. To ensure this utopia-ui
has a watcher script, run it to
automatically rebuild when files change:
npm start
- use heroicons or alternatively React Icons
- use Daisy UI with tailwindcss
- make use of the Daisy UI theme colors