4.53.5 • Published 5 months ago

@box/blueprint-web-assets v4.53.5

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
5 months ago

Blueprint Web assets @box/blueprint-web-assets

@box/blueprint-web-assets is a comprehensive collection of Box assets(icons, illustrations) and tokens (color, font, spacing, etc..). You can check available assets in our Portal.

Installation

yarn add @box/blueprint-web-assets

Usage

Tokens

In scss files:

If possible, use css variables:

@use '@box/blueprint-web-assets/tokens/tokens-css-vars.scss';
...

.component {
    background-color: var(--background-background);
}

Otherwise, you can use scss tokens, but bear in mind that this method is deprecated:

@use '@box/blueprint-web-assets/tokens/tokens.scss'; // or @import if you're not using dart sass

...

.component {
    background-color: tokens.$background-background;
}

In tsx files:

import { BackgroundBackground } from '@box/blueprint-web-assets/tokens/tokens';

...

<Checkmark color={BackgroundBackground} />

Currently we also distribute '@box/blueprint-web-assets/tokens/px-tokens' - js file containing tokens in pixel values. You should use it only if your use case doesn't support rem units, e.g. e-mail clients.

Assets

You can use all icons as regular React components.

import { InfoBadge } from '@box/blueprint-web-assets/icons/Line';

...

<InfoBadge />

To change icon color you can use color prop:

import { Alert } from '@box/blueprint-web-assets/icons/Fill';
import { IconIconErrorOnLight } from '@box/blueprint-web-assets/tokens/tokens';
...

<Alert color={IconIconErrorOnLight} />

Icon path defines icon style:

import { InfoBadge } from '@box/blueprint-web-assets/icons/Line';
import { Alert } from '@box/blueprint-web-assets/icons/Fill';
import { FileAudio } from '@box/blueprint-web-assets/icons/Content';
import { BoxLogo } from '@box/blueprint-web-assets/icons/Logo';

How to update assets and tokens

yarn nx build-local-all blueprint-web-assets
yarn nx lint blueprint-web-assets --fix
yarn nx format blueprint-web-assets

Push changes to a new branch. New version of package will be released after merge.

Project scripts

  • nx test blueprint-web-assets to execute unit tests via Jest
  • nx lint blueprint-web-assets to execute lint via ESLint
4.37.3

8 months ago

4.37.2

8 months ago

4.37.1

8 months ago

4.37.0

8 months ago

4.40.3

7 months ago

4.40.2

7 months ago

4.40.1

7 months ago

4.44.3

6 months ago

4.40.7

7 months ago

4.44.2

6 months ago

4.40.6

7 months ago

4.44.1

6 months ago

4.40.5

7 months ago

4.40.4

7 months ago

4.49.2

5 months ago

4.49.1

5 months ago

4.49.3

5 months ago

4.52.1

5 months ago

4.52.2

5 months ago

4.33.2

9 months ago

4.33.1

9 months ago

4.33.0

9 months ago

4.40.12

7 months ago

4.40.11

7 months ago

4.40.14

7 months ago

4.40.13

7 months ago

4.40.16

7 months ago

4.40.15

7 months ago

4.43.2

6 months ago

4.40.10

7 months ago

4.43.1

6 months ago

4.48.3

5 months ago

4.48.2

6 months ago

4.48.1

6 months ago

4.40.9

7 months ago

4.40.8

7 months ago

4.48.4

5 months ago

4.29.0

12 months ago

4.32.0

9 months ago

4.51.1

5 months ago

4.36.0

8 months ago

4.39.1

8 months ago

4.39.0

8 months ago

4.39.3

7 months ago

4.42.1

6 months ago

4.46.1

6 months ago

4.47.3

6 months ago

4.47.2

6 months ago

4.47.1

6 months ago

4.31.1

10 months ago

4.31.0

10 months ago

4.50.1

5 months ago

4.35.0

9 months ago

4.38.0

8 months ago

4.41.2

7 months ago

4.41.1

7 months ago

4.41.6

7 months ago

4.45.1

6 months ago

4.41.5

7 months ago

4.41.4

7 months ago

4.41.3

7 months ago

4.46.4

6 months ago

4.46.3

6 months ago

4.46.2

6 months ago

4.53.1

5 months ago

4.30.1

11 months ago

4.30.0

12 months ago

4.53.4

5 months ago

4.53.5

5 months ago

4.53.2

5 months ago

4.34.0

9 months ago

4.53.3

5 months ago

4.28.0

1 year ago

4.26.0

1 year ago

4.27.0

1 year ago

4.19.0

1 year ago

4.22.0

1 year ago

4.21.1

1 year ago

4.23.0

1 year ago

4.21.2

1 year ago

4.24.0

1 year ago

4.21.3

1 year ago

4.25.0

1 year ago

4.21.4

1 year ago

4.20.0

1 year ago

4.21.0

1 year ago

4.21.5

1 year ago

4.15.0

1 year ago

4.16.0

1 year ago

4.12.0

1 year ago

4.13.0

1 year ago

4.14.0

1 year ago

4.11.0

1 year ago

4.10.0

1 year ago

4.9.1

1 year ago

4.9.0

2 years ago

4.8.1

2 years ago

4.8.0

2 years ago

4.7.0

2 years ago

4.6.0

2 years ago

4.5.0

2 years ago

4.4.2

2 years ago

4.4.1

2 years ago

4.4.0

2 years ago

4.3.0

2 years ago

4.2.2

2 years ago