Getting StartedIntroduction SOONInstallation SOONChange log SOONRoadmap SOON
Components
ContainerFlex SOONGrid SOONSticky SOONSeparator SOONAspect Ratio SOONVisually Hidden SOON
DialogPopover SOONTooltipDropdown Menu SOONContext Menu SOONHover Card SOON
Link SOONNavigation Menu SOONBreadcrumbs SOONPagination SOONStepper SOON
Collapsible SOONAccordion SOONTabs SOON
H1 SOONH2 SOONH3 SOONH4 SOONH5 SOONH6 SOONP SOONSpan SOONEm SOONI SOONStrong SOONB SOONQ SOONBlockquote SOONUl SOONOl SOONKbd SOONCode SOONTable of Contents SOON
Icon SOONAvatar SOONAvatar Group SOONImage SOONVideo SOON
Notification SOONNotification Panel SOONToast SOONAlert SOON
Spinner SOONProgress Bar SOON
Button SOONBurger Button SOONButton Group SOON
Article Preview SOONBadge SOONCard SOONCommand Line SOONTable SOONTag SOONTag Group SOONTag Picker SOONTestimonial SOONProduct Tile SOONSkeleton SOONStatistic SOON
Address Input SOONCheckbox SOONCalendar Input SOONCalendar Range Input SOONColor Picker SOONCurrency Input SOONCredit Card Input SOONDate Input SOONDate Picker SOONDate Range Input SOONDate Range Picker SOONFieldset SOONFile Input SOONFile Dropzone SOONFile Picker SOONLabel SOONPin Input SOONPhone Number Input SOONRadio Button SOONRadio Group SOONRange Slider SOONRating SOONSearch Input SOONSwitch SOONSegmented Control SOONSelect SOONSlider SOONText Input SOONTextarea SOONToggle SOONToggle Group SOONURL Input SOON
TBD SOON

B

A b element with control for typographic attributes.

Generally, b tags will go inside p tags and inherit whatever typographical attributes that paragraph has. But because b's' are not limited to being inside paragraphs, this elements also allows you to control typographic attributes.

The <b> HTML element is used to draw the reader's attention to the element's contents, which are not otherwise granted special importance. This was formerly known as the Boldface element, and most browsers still draw the text in boldface. However, you should not use <b> for styling text because that's a job for CSS and you should not use <b> for granting importance or stress emphasis because that's a job for the <strong> and <em> tags, respectively.

<b> vs <strong>

It is often confusing to new developers why there are so many ways to express the same thing on a rendered website. <b> and <strong> are perhaps one of the most common sources of confusion, causing developers to ask "Should I use <b> or <strong>? Don't they both do the same thing?"

Not exactly. The <strong> element is for content that is of greater importance, while the <b> element is used to draw attention to text without indicating that it's more important.

It may help to realize that both are valid and semantic elements in HTML and that it's a coincidence that they both have the same default styling (boldface) in most browsers (although some older browsers actually underline <strong>). Each element is meant to be used in certain types of scenarios, and if you want to bold text for decoration, you should instead actually use the CSS font-weight property.

The intended meaning or purpose of the enclosed text should be what determines which element you use. Communicating meaning is what semantics are all about.

Features

Parts and their API

B

A b element with control for typographic attributes.

Props

PropTypeDefaultDescription
weightenum: black, extrabold, bold, semibold, medium, normal, light, extralight, thinNo default valueThe font weight.
sizeenum: 4xl, 3xl, 2xl, xl, lg, md, sm, xsNo default valueThe font size.
alignenum: left, center, or rightNo default valueThe text alignment.
trackingenum: tighter, tight, normal, wide, wider, or widestsize-dependentThe letter spacing.

The tracking's default value depends on the size prop and is controlled through CSS variables: check out the styling section.

Usage

BExample.tsx
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
<P>
The two most popular science courses offered by the school are <B>chemistry</B>
(the study of chemicals and the composition of substances) and <B>physics</B>
(the study of the nature and properties of matter and energy).
</P>

Here's the <B /> component in action.

The two most popular science courses offered by the school are chemistry (the study of chemicals and the composition of substances) and physics (the study of the nature and properties of matter and energy).

Notice how the <B> element is used to draw attention to text without indicating that it's more important.

Source

Styling

tailwind.css
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
/* ### Typography ### */
@layer components {
/* B */
.b {
@apply font-bold;
}
}