React Bulma Components is a library providing a comprehensive set of React components that directly implement the Bulma CSS framework, offering a declarative way to build user interfaces adhering to Bulma's design principles. The current stable version is 4.1.0, actively receiving patch and minor updates, with major versions (like v4.0.0) introducing significant breaking changes. Key differentiators include its compatibility across popular React frameworks such as Gatsby, Create React App, and Next.js. Since version 4, the library supports tree-shaking by default, optimizing bundle sizes. It also provides a unique `domRef` prop for passing refs to underlying DOM elements, bypassing React's `forwardRef` to reduce overhead in the React Dev Tools. Developers should note that some component APIs or naming conventions might diverge from official Bulma documentation, necessitating consultation of its Storybook documentation. The library expects Bulma CSS to be provided externally as a peer dependency, offering flexibility for custom SASS setups.
npm install react-bulma-componentsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and use several core components like Button, Box, Section, and Container, while also ensuring the necessary Bulma CSS is loaded. It illustrates basic component composition and prop usage.
Install Bulma via npm: `npm install bulma` and import it in your entry file: `import 'bulma/css/bulma.min.css';`
Migrate any usage of `<List />` to standard HTML list elements or implement a custom React component based on Bulma's list styling guidelines.
Replace `ref={myRef}` with `domRef={myRef}` when attaching a ref to a `react-bulma-components` component.Consult the official Storybook documentation at `https://react-bulma.dev/en/storybook` for specific component usage examples and prop definitions.
Carefully review the Storybook for each component and incrementally update your code. Pay close attention to prop changes and behavior differences.
Run `npm install bulma` or `yarn add bulma`, then add `import 'bulma/css/bulma.min.css';` to your application's entry point (e.g., `index.js` or `App.js`).
Ensure you import `Form` and then destructure its properties: `import { Form } from 'react-bulma-components'; const { Input, Field, Control, Label } = Form;`Change `ref={myRef}` to `domRef={myRef}` on the `react-bulma-components` component.