The badge tag is a div element if we try to create badges inside a P element we will get this error:
node_invalid_placement_ssr: `<p>` (node_modules/flowbite-svelte/dist/typography/P.svelte:69:0) cannot contain `<div>` (node_modules/flowbite-svelte/dist/badge/Badge.svelte:60:2)
This can cause content to shift around as the browser repairs the HTML, and will likely result in a `hydration_mismatch` warning.
Reproduction
<script>
import { P, Badge } from 'flowbite-svelte'
</script>
<div>
<P>
This badge is throwing an error: <Badge large>some text</Badge>
</P>
</div>
Describe the bug
The badge tag is a
div
element if we try to create badges inside aP
element we will get this error:Reproduction
Flowbite version and System Info