Installation
Install the package alongside its peer dependencies. There is no CSS file to import and no build plugin to configure.
Package manager
Install @metatoy/bootstrap-styled together with styled-components, react, and
react-dom:
npm install @metatoy/bootstrap-styled styled-components react react-dom The same one line with your package manager of choice:
# pnpm
pnpm add @metatoy/bootstrap-styled styled-components react react-dom
# yarn
yarn add @metatoy/bootstrap-styled styled-components react react-dom Peer dependencies
react, react-dom, and styled-components are peer dependencies — you install
them in your app so there is exactly one copy of each. styled-components in particular
must be a singleton, or theming and style injection break.
| Package | Range | Why |
|---|---|---|
| react | >=18 | Components are function components using modern hooks. |
| react-dom | >=18 | Overlays (Modal, Tooltip, Dropdown) portal into the document. |
| styled-components | >=6 | The styling engine; the theme flows through its ThemeProvider. |
Bundled dependencies
Two dependencies ship inside the package — you do not install them yourself:
bootstrap-icons— the full Bootstrap Icons set, pinned to1.13.1. The<Icon/>component and the tree-shakeableBsIcon*exports read from it, so icons work out of the box.@floating-ui/react— positions the portaled overlays (Tooltip, Popover, Dropdown, Offcanvas).
TypeScript
Type declarations ship with the package (dist/index.d.ts) — there is nothing extra
to install. See the TypeScript page for typed
usage.
Next steps
Wrap your app in the provider and render your first component — head to Usage.