Bootstrap
Bootstrap v5 adapter usage
import 'bootstrap/dist/css/bootstrap.min.css';import 'bootstrap-icons/font/bootstrap-icons.css';import '@vojtechportes/react-query-builder/styles.css';import { components } from '@vojtechportes/react-query-builder/bootstrap/v5';<Builderfields={fields}data={data}components={components}onChange={setData}/>;
Bootstrap v5 import
import { components } from '@vojtechportes/react-query-builder/bootstrap/v5';
createBootstrapComponents
import {Builder,type DenormalizedQuery,} from '@vojtechportes/react-query-builder';import 'bootstrap/dist/css/bootstrap.min.css';import 'bootstrap-icons/font/bootstrap-icons.css';import '@vojtechportes/react-query-builder/styles.css';import {createBootstrapComponents,components as bootstrapComponents,} from '@vojtechportes/react-query-builder/bootstrap/v5';const components = createBootstrapComponents(bootstrapComponents, {form: {Input: MyInput,},Add: MyAddButton,});export const MyBootstrapBuilder = () => {const [data, setData] = useState<DenormalizedQuery>(initialData);return (<Builderfields={fields}data={data}components={components}onChange={setData}/>);};
Available entrypoint
@vojtechportes/react-query-builder/bootstrap/v5Bootstrap 5 adapter.
Exports
componentsReady-made Bootstrap component mapping forBuilder.- Individual mapped components Named exports such as
BootstrapSelect,BootstrapInput, and related Bootstrap-backed controls for partial overrides. createBootstrapComponentsMerges Bootstrap defaults with local overrides while preserving nestedformkeys.- Stylesheet requirement Import
bootstrap/dist/css/bootstrap.min.cssandbootstrap-icons/font/bootstrap-icons.cssbefore rendering the adapter so the Bootstrap classes and official icon set resolve to actual styles.
Documentation