Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
Mayank edited this page Aug 2, 2021 · 26 revisions

Don't see your problem listed here? You can create a discussion or issue.

iTwinUI-css vs iTwinUI-react

What is the difference? Do I need one or both?

The base iTwinUI-css package is meant to offer standalone component styling, as well as Sass variables for spacing, color, etc.

The iTwinUI-react package depends on and uses styles from the base iTwinUI-css package to offer React components.

If you only need to use the components in isolation, you only need to install iTwinUI-react. But if you're building a complete app, you might also need to make use of the Sass variables exported in iTwinUI-css.


Popover (tooltips, dropdowns, etc)

Our popover components wrap an external library called tippy.js. We recommend going through their documentation if you have trouble using them.

My tooltip does not show up on hover.

This can happen if the child component does not forward its ref (see docs). It can also happen if the child component is disabled. One workaround is to wrap your content in a div or span.

My tooltip appears cut off!

This can happen due to the parent container using CSS overflow or position: absolute or z-index stacking contexts. (By default, Tooltip is appended to the parent container.) The workaround is to use appendTo={() => document.body}.

I want to show my tooltip on a different element

If you want your popover to be triggered on an element that is not a direct child, you can use the reference prop.


Table

Our table is a styled wrapper around react-table. We recommend going through their documentation and issues before opening new issues in iTwinUI-react.

Missing table features

If you find that the table is missing a feature, there may already be an existing issue for it. You can upvote 👍 the relevant issue (and/or leave a comment) to help us prioritize it.

Conflicts with react-table v6

iTwinUI-react uses react-table v7, which can cause problems if your project is also using react-table v6. Using custom aliases in package.json for both react-table v6 and its types can help:

...
"react-table-v6": "npm:react-table@^6.11.5"
...
"@types/react-table-v6: "npm:@types/react-table@^6.8.8"
...
Clone this wiki locally