# @ajsf/bootstrap5
[](https://sonarcloud.io/summary/new_code?id=hamzahamidi_ajsf)
Bootstrap 5 framework for [AJSF](https://github.com/hamzahamidi/ajsf#readme), which builds Angular forms from JSON Schema.
## Getting started
Install the package and Bootstrap 5:
```shell
npm install @ajsf/bootstrap5 bootstrap@5
```
Add Bootstrap's stylesheet to the `styles` of the build target in `angular.json`:
```json
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
]
```
Import `Bootstrap5FrameworkModule` in the standalone component that renders the form. Nothing goes in `app.config.ts`:
```typescript
import { Component } from '@angular/core';
import { Bootstrap5FrameworkModule } from '@ajsf/bootstrap5';
@Component({
selector: 'app-root',
imports: [Bootstrap5FrameworkModule],
templateUrl: './app.html',
})
export class App {
schema = {
type: 'object',
properties: {
name: { type: 'string', title: 'Name' },
plan: { type: 'string', title: 'Plan', enum: ['free', 'pro', 'team'] },
},
required: ['name'],
};
onSubmit(data: any) {
console.log(data);
}
}
```
In an `NgModule` app, add `Bootstrap5FrameworkModule` to the module's `imports` instead.
Then render the form in the component's template:
```html
```
`framework="bootstrap-5"` selects this package's templates. The other values are `material-design`, `primeng`, `bootstrap-3`, `bootstrap-4` and `no-framework`, the default.
To try the library without installing Bootstrap, bind `[loadExternalAssets]="true"` on `` instead, which loads Bootstrap 5 from a CDN. Load the assets yourself in production.
The [AJSF README](https://github.com/hamzahamidi/ajsf#readme) covers the other inputs and outputs, layouts, custom widgets and validation messages.
## Checkbox and radio structure, changed in 22.1.0
Checkboxes and radios previously rendered the `` inside its `