1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 headingPrimary := hb.Heading1(). HTML("Example heading"). Child(hb.Span().Class("badge bg-primary ms-2").HTML("New")) headingSecondary := hb.Heading2(). HTML("Example heading"). Child(hb.Span().Class("badge bg-secondary ms-2").HTML("New")) headingSuccess := hb.Heading3(). HTML("Example heading"). Child(hb.Span().Class("badge bg-success ms-2").HTML("New")) headingDanger := hb.Heading4(). HTML("Example heading"). Child(hb.Span().Class("badge bg-danger ms-2").HTML("New")) headingWarning := hb.Heading5(). HTML("Example heading"). Child(hb.Span().Class("badge bg-warning ms-2").HTML("New")) headingInfo := hb.Heading6(). HTML("Example heading"). Child(hb.Span().Class("badge bg-info ms-2").HTML("New")) headingLight := hb.Heading6(). HTML("Example heading"). Child(hb.Span().Class("badge bg-light text-dark ms-2").HTML("New")) headingDark := hb.Heading6(). HTML("Example heading"). Child(hb.Span().Class("badge bg-dark ms-2").HTML("New")) buttonWithBadge := hb.Button(). Class("btn btn-primary"). HTML("Notifications"). Child(hb.Span().Class("badge text-bg-secondary ms-2").HTML("4")) buttonWithPositionedBadge := hb.Button(). Class("btn btn-primary position-relative"). HTML("Notifications"). Child(hb.Span().Class("badge text-bg-secondary position-absolute top-0 start-100 translate-middle rounded-pill").HTML("4")) pillBadgePrimary := hb.Span(). Class("badge bg-primary rounded-pill"). HTML("Primary") pillBadgeSecondary := hb.Span(). Class("badge bg-secondary rounded-pill ms-2"). HTML("Secondary") pillBadgeSuccess := hb.Span(). Class("badge bg-success rounded-pill ms-2"). HTML("Success") pillBadgeDanger := hb.Span(). Class("badge bg-danger rounded-pill ms-2"). HTML("Danger") pillBadgeWarning := hb.Span(). Class("badge bg-warning rounded-pill ms-2"). HTML("Warning") pillBadgeInfo := hb.Span(). Class("badge bg-info rounded-pill ms-2"). HTML("Info") pillBadgeLight := hb.Span(). Class("badge bg-light rounded-pill text-dark ms-2"). HTML("Light") pillBadgeDark := hb.Span(). Class("badge bg-dark rounded-pill ms-2"). HTML("Dark")