Skip to documentation
BoobstrapDocs
Interactivity

Behavior layers

Choose CSS only, Boobstrap JS, Alpine, React, Vue, or your own application behavior.

Interactivity guideCopy-ready referencev0.7.0 current
Interactivity

Choose your behavior layer

Boobstrap never requires a runtime. Static HTML can use the complete visual system by itself; interactive projects can initialize dependency-free controllers or let Alpine, React, or Vue own the same component contract.

Base

CSS only

Use semantic markup and every bs- class without loading JavaScript.

Official

Boobstrap JS

Progressively enhance accordions, notifications, overlays, navigation, form helpers, and floating content through explicit controllers.

Official adapter

Alpine.js

Keep reactive state in Alpine with reusable x-data providers and x-bind objects.

Official adapter

React

Use SSR-safe headless hooks with controlled or uncontrolled React state and consumer-owned markup.

Official adapter

Vue

Use SSR-safe headless composables with refs, computed state, and consumer-owned templates.

The classes, events, and accessibility contract stay consistent while the selected behavior layer owns state.

Importing the stylesheet remains runtime-free. Initialize all supported controllers, or import one component from a dedicated subpath.

JavaScript · Boobstrap JS
npm install @boobstrap/boobstrap

import "@boobstrap/boobstrap";
import { initBoobstrap } from "@boobstrap/boobstrap/js";

const boobstrap = initBoobstrap();

Adapter parity

The official adapters cover the same stateful component families where application-owned reactivity is useful. Browser-specific progressive enhancements remain core-only. The framework publishes this mapping as interactionContract, and its conformance suite verifies the declared capability and event surface.

SurfaceBoobstrap JSAlpineReactVue
AccordionAccordionaccordionuseAccordionuseAccordion
ButtonButtonbuttonuseButtonuseButton
Collapse, combobox, dialog, dropdownControllersNamed providersuse* hooksuse* composables
Popover, tabs, toast, tooltipControllersNamed providersuse* hooksuse* composables
Banner, input mask, OTP, password, sidebarControllersUse core or application behaviorUse core or application behaviorUse core or application behavior
JavaScript · Inspect the conformance manifest
import { interactionContract } from "@boobstrap/boobstrap/js";

const toast = interactionContract.toast;
console.log(toast.adapters.vue); // useToast
console.log(toast.capabilities); // duration, autohide, pointer/focus pause…
Do not stack behavior layers. Use Boobstrap JS, Alpine, React, or Vue on a component subtree—not more than one. See the Accordion guide for the same grouped-disclosure contract in all four layers and the TypeScript guide for declaration coverage.

CSS only

Choose CSS only for static components and when your application already owns all state and accessibility behavior.

One owner

Use Boobstrap JS, Alpine, React, Vue, or custom application code for a component—not multiple controllers on the same markup.

Progressive enhancement

Start from meaningful HTML and a readable initial state. Add behavior after the content remains usable without script execution.