npm.io
1.16.2 • Published yesterday

@bodynarf/react.components

Licence
—
Version
1.16.2
Deps
0
Size
1.1 MB
Vulns
0
Weekly
0

About

Small library with react components based on Bulma CSS framework  Made with Bulma

Installation

  1. Install React
  2. Install Bulma
  3. Make sure you imported bulma styles in parent container
  4. (Optional) To use Icon component - install Bootstrap Icons and make sure you imported these styles in parent container
  5. (Optional) To use Checkbox component - install bulma-checkradio and make sure you imported these styles in parent container

Demo

Demo of using all components can be found on https://bodynar.github.io/bodynarf.react-components/ (or open latest build in github repository)

Components

The full catalog of components, CSS utilities and hooks lives in COMPONENTS.md.

Description

Mostly all components have root css class with bbr- prefix. BBR - Bodynarf Bulma React

Import recommendations

Prefer importing components directly from their folder rather than from the package barrel file. Direct imports avoid pulling the entire library into the bundle and give bundlers (Vite, webpack, etc.) a clear tree-shaking boundary.

Bad — barrel import:

import { AutoComplete } from "@bodynarf/react.components";

Good — direct import:

import AutoComplete from "@bodynarf/react.components/components/primitives/autoComplete";

For types only, barrel imports are acceptable since they are erased at compile time and have no runtime cost:

import type { AutoCompleteItem, AutoCompleteProps } from "@bodynarf/react.components";

Keywords