Skip to content

UIRoot

UIRoot wrapping content
Styled

UIRoot is the required top-level wrapper for all instrument panels. When it mounts, it calls ensureInstrumentUI() which injects the full Tango UI stylesheet (tui-* classes) into the document head.

Every component in this library expects to be rendered inside a UIRoot. Without it, components will have no styles.

PropTypeDefaultDescription
classNamestringAdditional CSS class on the root div
fixedbooleanfalseAdds tui-root-fixed class for fixed-position layouts
childrenReactNodePanel content
ClassDescription
tui-rootAlways applied — sets background, color, font, and all CSS variables
tui-root-fixedApplied when fixed={true}
import { UIRoot, UIPanelHeader, UISection } from "tango-api";
function MyPanel() {
return (
<UIRoot>
<UIPanelHeader title="My Instrument" />
<UISection title="Content">
{/* Your panel content */}
</UISection>
</UIRoot>
);
}