1.5.16 • Published 5 months ago

@onbeam/icons v1.5.16

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@onbeam/icons

A collection of icons (as React components) from the Beam design system, which can also be used standalone. Click here for an overview of all icons.

Table of Contents

Installation

Install the package using your preferred package manager:

npm install @onbeam/icons
# or
yarn add @onbeam/icons
# or
pnpm add @onbeam/icons

To keep all @onbeam packages updated, you can use the CLI:

npx @onbeam/cli update -d [directory]

Usage

Import and use the icons in your project:

import { BeamIcon } from "@onbeam/icons";

const MyComponent = () => {
  return (
    <div>
      <BeamIcon width={16} height={16} />
    </div>
  );
};

Note: Replace BeamIcon with the name of the icon you want to use.

Tree-Shaking Support

This package is fully tree-shakable, ensuring that only the icons you import are included in your final bundle, optimizing your app's performance.

Icon Properties

PropertyTypeDefaultDescription
widthnumber"24"Sets the width of the icon.
heightnumber"24"Sets the height of the icon.
classNamestringundefinedAdds custom CSS classes to the icon element.

Customization

You can customize icons by passing size or using CSS classes. For advanced customization, consider wrapping the icons in your own components to define default styles or using the Icon wrapper component from @onbeam/ui.

Examples

Example 1: Basic usage

import { BeamIcon } from "@onbeam/icons";

const App = () => (
  <div>
    <BeamIcon width={32} height={32} className="red" />
  </div>
);

Example 2: In combination with @onbeam/styled-system

import { BeamIcon } from "@onbeam/icons";
import { css } from "@onbeam/styled-system";

const App = () => (
  <div>
    <BeamIcon width={32} height={32} className={css({ color: "mono.100" })} />
  </div>
);

Example 3: With Icon wrapper component

import { BeamIcon } from "@onbeam/icons";
import { Icon } from "@onbeam/ui";

const App = () => (
  <div>
    <Icon size={32}>
      <BeamIcon className={css({ color: "mono.100" })} />
    </Icon>
  </div>
);

All @onbeam packages


That's it! Happy coding! 🌈

1.2.8

9 months ago

1.2.7

11 months ago

1.2.6

12 months ago

1.2.5

12 months ago

1.2.4

12 months ago

1.4.1

7 months ago

1.2.3

12 months ago

1.4.0

7 months ago

1.2.2

12 months ago

1.2.1

12 months ago

1.5.9

6 months ago

1.5.8

6 months ago

1.5.7

6 months ago

1.5.6

6 months ago

1.2.10

9 months ago

1.2.11

9 months ago

1.5.5

6 months ago

1.5.4

6 months ago

1.5.3

7 months ago

1.5.2

7 months ago

1.5.1

7 months ago

1.5.0

7 months ago

1.3.1

8 months ago

1.3.0

8 months ago

1.5.10

6 months ago

1.5.12

6 months ago

1.5.11

6 months ago

1.5.14

5 months ago

1.5.13

6 months ago

1.5.16

5 months ago

1.5.15

5 months ago

1.2.9

9 months ago

1.2.0

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.1

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-28

2 years ago

1.0.0-24

2 years ago

1.0.0-25

2 years ago

1.0.0-26

2 years ago

1.0.0-27

2 years ago

1.0.0-23

2 years ago

1.0.0-22

2 years ago

1.0.0-19

2 years ago

1.0.0-20

2 years ago

1.0.0-21

2 years ago

1.0.0-16

2 years ago

1.0.0-17

2 years ago

1.0.0-18

2 years ago

1.0.0-11

2 years ago

1.0.0-12

2 years ago

1.0.0-13

2 years ago

1.0.0-14

2 years ago

1.0.0-15

2 years ago

1.0.0-10

2 years ago

1.0.0-9

2 years ago

1.0.0-8

2 years ago

1.0.0-7

2 years ago

1.0.0-6

2 years ago

1.0.0-5

2 years ago

1.0.0-4

2 years ago

1.0.0-3

2 years ago

1.0.0-2

2 years ago

1.0.0-1

2 years ago