🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@dagster-io/ui

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dagster-io/ui

Dagster UI Component Library

latest
npmnpm
Version
1.0.9
Version published
Weekly downloads
235
739.29%
Maintainers
2
Weekly downloads
 
Created
Source

Dagster UI Component Library

This project contains the core React UI component library used by Dagster products.

While published as a public package, it is not intended for use outside Dagster code, and is not currently supported for public consumption.

Semver usage is likely to be inconsistent, and new versions may be published with breaking changes without warning.

Usage

1. Install package.

yarn add @dagster-io/ui

Note that the library currently includes a lot of peer dependencies. Be sure to install these.

2. Add font styles

If necessary, add font styles to your application root and use them in your global styles.

If you are importing fonts via some other means (e.g. Google Fonts API) you may not need to do this.

import {FontFamily, GlobalInter} from '@dagster-io/ui`;
import {createGlobalStyle} from 'styled-components';

const GlobalStyle = createGlobalStyle`
  * {
    font-family: ${FontFamily.default}; /* Default font is Inter */
  }
`;

const MyAppRoot = () => (
  <>
    <GlobalInter />
    <GlobalStyle />
    <div>
      /* Your app */
    </div>
  </>
);

3. Import components

import {Box, Button, Colors, Icon} from '@dagster-io/ui';

The rollup build specifies certain common components to be split into their own bundles to allow consumers to minimize their bundle size and avoid importing the entire library, since it currently contains a lot of complex, heavy components that you may not need.

If you find that your import of a specific component has blown up your build size, we can add it to the input list in rollup.config.js to split it into its own bundle.

4. Add Blueprint CSS.

If necessary, add Blueprint CSS. Some components require underlying Blueprint styles. Many do not.

How do I know if I need Blueprint?

  • Check if the component you are using renders a Blueprint component. If so, include Blueprint CSS.
  • If you're not sure, try rendering the component and see if its styles look broken. If so, and the styles involve a bp3 CSS class, you need Blueprint CSS.
/* blueprint.css */

@import '@blueprintjs/core/lib/css/blueprint.css';
@import '@blueprintjs/icons/lib/css/blueprint-icons.css';
@import '@blueprintjs/select/lib/css/blueprint-select.css';
@import '@blueprintjs/table/lib/css/table.css';
@import '@blueprintjs/popover2/lib/css/blueprint-popover2.css';
import './blueprint.css';

export const MyAppRoot = () => ...;

FAQs

Package last updated on 13 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts