Welcome to PreactBoot’s documentation!

Simple, declarative Bootstrap 4 components for use with preact.

Components

Alerts

Alerts are good to use for notifications for example:

1
2
3
4
5
 <Alert color={"warning"}>
     <Heading tag={"h4"}>Warning</Heading>
     Your account information might have been stolen.
     <Link href="#">More Information</Link>
 </Alert>

Props

color : Color
Bootstrap color schema (see Color)
dismissible : boolean | "animated"
Whether the the alert has an button to allow the user dismissing it.

Note

You have to handle the dismiss action yourself through onDismiss.

onDismiss : () => void
Function called when the user clicks the dismiss button.

Misc

Misc stuff like types and additional information.

Types

Basic (TypeScript) types used in PreactBoot

Color

Containing file: util/bootstrap

"primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark"

Index