bloomer → bestax-bulma prop map
Most of bloomer's boolean modifiers are already bestax's names — isLoading, isOutlined,
isInverted, isStatic, isHovered, isFocused, isBordered, isStriped, isNarrow,
isMultiline, isVCentered, isMobile, … pass through untouched. The exceptions are in
the tables below: isActive becomes active on the components whose bestax counterpart
names it that way, isFullWidth becomes isFullwidth where bestax declares it, and a few
(Input isActive, NavbarLink isActive, PageLink isActive) have no counterpart and become
the Bulma class in className instead (see the end of this page). What else changes is the value-carrying props, the helper props every component
inherited from withHelpersModifiers, and the two props bestax spells differently on every
component.
Universal helper props
bloomer's withHelpersModifiers mixed these into every component.
| bloomer | bestax-bulma | note |
|---|---|---|
hasTextAlign="centered" |
textAlign="centered" |
left / right / centered — same union |
hasTextColor="grey-light" |
textColor="grey-light", or className="has-text-grey-light" |
textColor is declared per component, not by the helper hook, so it carries over on the ~48 targets that have it and becomes the Bulma class on the rest (Tag, Table, Hero, Menu, Breadcrumb, Panel, Icon, Progress, the form controls); every Bulma 0.6 colour and shade works |
isPulled="right" |
float="right" |
|
isClearfix |
clearfix |
|
isOverlay |
overlay |
|
isUnselectable |
interaction="unselectable" |
|
isMarginless |
m="0" |
bestax expresses the is-*less helpers as spacing |
isPaddingless |
p="0" |
|
isFullWidth |
isFullwidth |
on Button, Select, Table, Tabs |
isDisplay, isHidden |
display*, visibility* |
flattened — see below |
tag |
as |
where bestax declares one — see below |
render |
— | always a TODO |
isDisplay and isHidden
Both take three shapes in bloomer; all three flatten onto bestax's per-viewport props. bestax
declares every Bulma viewport, including touch and the -only ones, so nothing is lost:
| bloomer | bestax-bulma |
|---|---|
isDisplay="flex" |
display="flex" |
isDisplay="flex-tablet-only" |
displayTabletOnly="flex" |
isDisplay={['inline-block', 'flex-desktop']} |
className="is-inline-block" displayDesktop="flex" |
isDisplay={{ flex: ['default', 'tablet'], block: 'mobile' }} |
className="is-flex" displayTablet="flex" displayMobile="block" |
isHidden |
visibility="hidden" |
isHidden="touch" |
visibilityTouch="hidden" |
isHidden={['mobile', 'widescreen-only']} |
visibilityMobile="hidden" visibilityWidescreenOnly="hidden" |
A plain display beside a per-viewport one stays its class in className (is-inline-block),
since bestax leaves display out once a per-viewport display prop is set; see prop:display-base in
unmappables.md. Two entries that land on the same prop, a dynamic value, or a
viewport bestax does not know get a TODO; the bloomer prop is always removed, because bestax has no isDisplay/isHidden and a
leftover would be a type error rather than a no-op.
Value props
| bloomer | bestax-bulma |
|---|---|
isColor="primary" |
color="primary" (every component that had it) |
isSize="large" |
size="large" — Button, Content, Delete, Icon, Input, Progress, Section, Select, Tag, TextArea, Breadcrumb, Pagination, Tabs, Field.Label, Modal.Close |
Title isSize={3} |
textSize="3", so the <h1> stays an <h1> (see Title and Subtitle sizes) |
Subtitle isSize={4} |
SubTitle textSize="4" as="h2": bloomer's default was an <h2>, bestax's is an <h1>, so the level is written out |
Image isSize="128x128" |
size="128x128" |
Image isRatio="16:9" |
size="16by9" (square→square, 1:1→1by1, 4:3→4by3, 3:2→3by2, 2:1→2by1) |
Breadcrumb isAlign |
alignment |
Breadcrumb hasSeparator |
separator |
Tabs isAlign |
align; isBoxed → boxed, isToggle → toggle |
Pagination isAlign |
align ("left" is the default and is dropped) |
Dropdown isAlign="right" |
right; isHoverable → hoverable |
Icon isAlign="left" |
className="is-left" (bestax's Icon has no align prop) |
Icon className="fas fa-spinner fa-spin" |
name="spinner" library="fa" variant="solid" features="fa-spin" — modifier classes become features |
PanelIcon className="fas fa-book" |
Panel.Icon name="book" library="fa" variant="solid" — same className API as Icon |
Button isLink |
color="link" (a TODO if isColor is also set) |
Hero isFullHeight |
size="fullheight" |
Container isFluid |
fluid |
Navbar isTransparent |
transparent |
Field isGrouped, isHorizontal |
grouped (same boolean | 'centered' | 'right'), horizontal |
FieldLabel isNormal |
size="normal" |
Control hasIcons |
hasIconsLeft / hasIconsRight (true sets both; an array sets each) |
PageLink isCurrent |
active |
isActive on Dropdown, DropdownItem, MenuLink, Modal, NavbarBurger, NavbarMenu, NavbarItem, PanelBlock, Tab |
active |
Input, Select, TextArea |
InputBase, SelectBase, TextAreaBase — bloomer's were bare elements; bestax's Input/Select/TextArea wrap themselves in Field and Control, so the bare *Base exports are the faithful targets and your existing Field/Control markup stays as written |
Title and Subtitle sizes
bloomer's Title rendered an <h1> and its Subtitle an <h2> whatever isSize said, or
the element tag named. bestax's Title and SubTitle render the heading their size names
unless as="p", so <SubTitle size={4} as="h2"> is an <h4>. The codemod keeps the element
bloomer rendered:
| bloomer | bestax-bulma | renders |
|---|---|---|
<Title isSize={4}> |
<Title textSize="4"> |
<h1> |
<Title isSize={1}> |
<Title size={1}> |
<h1> |
<Title isSize={4} tag="h2"> |
<Title textSize="4" as="h2"> |
<h2> |
<Title isSize={6} tag="p"> |
<Title size={6} as="p"> |
<p> |
<Subtitle> |
<SubTitle as="h2"> |
<h2> |
<Subtitle isSize={2}> |
<SubTitle size={2}> |
<h2> |
<Subtitle isSize={4}> |
<SubTitle textSize="4" as="h2"> |
<h2> |
size stays only where it renders the same element: a <p>, or the heading the size names.
Everywhere else the size moves to the textSize helper, and so does a 7, which bestax's size
does not take. The helper sets the same font size through Bulma's is-size-4 class rather than the
title's own is-4, so a rule of your own that targets .title.is-4 needs the new class too.
is-size-4 is also !important, so a font size your own CSS gives the title, such as
.hero .title, now loses to it where it used to beat is-4. A literal outside 1 to 7 keeps size
and gets a prop:isSize TODO.
Column sizes
| bloomer | bestax-bulma |
|---|---|
isSize={4} isOffset={2} |
size={4} offset={2} |
isSize="1/2" |
size="half" (1/3→one-third, 1/4→one-quarter, 2/3→two-thirds, 3/4→three-quarters, full→full) |
isSize="narrow" |
isNarrow |
isSize={{ default: 'full', mobile: 8, tablet: '2/3' }} |
size="full" sizeMobile={8} sizeTablet="two-thirds" |
isSize={{ touch: 'narrow' }} |
isNarrowTouch — bestax has isNarrowTouch but no sizeTouch/offsetTouch, which become TODOs |
tag → as
bloomer put tag on nearly every component; bestax declares as on a subset, several of them
narrowed to a literal union, so a value outside the union is a type error you can see rather
than a silent rewrite. The components whose tag becomes as:
Button, Image, Title, Subtitle, Footer, Media, MediaLeft, Level, LevelItem, Control,
DropdownItem, MenuLink, NavbarItem, NavbarLink, Container, Hero, HeroHeader,
HeroFooter, Panel, Tag.
Everywhere else tag is left in place with a TODO. On the components that become plain markup
(Help, Label, Heading, BreadcrumbItem, PanelTab, TabLink, TabList, Page, HeroVideo) a
literal tag is honoured — <Help tag="span"> becomes <span className="help">.
A literal tag outside the union its bestax target narrows as to — <Media tag="section">,
<Control tag="span"> — is dropped with a prop:as TODO naming the tags that component does
render. bloomer rendered the tag you asked for; bestax does not offer it there, and writing it
through produced output the project could not compile.
href picks the element
bestax gives an element the attributes of the tag as names, so href exists only where that
tag is an <a>. bloomer had no such rule, and the two libraries part company in two ways.
bloomer's Button and Image never took tag at all. Seven bloomer components — Button,
Delete, LevelItem, DropdownItem, NavbarItem, PanelBlock, CardFooterItem — rendered
an <a> whenever href was set, whatever tag said, and a <div> (or their default tag)
otherwise; the rest (MenuLink, NavbarLink, PageControl, Dropdown, …) rendered their
tag regardless.
On the switching components the href wins the element, because that is what bloomer
rendered. Button and LevelItem gain as="a"; on the targets that already render an anchor
(Navbar.Item, Dropdown.Item, Panel.Block) the tag is simply dropped and the href
stays — each of those takes the anchor's props under its default as. A NavbarItem or
DropdownItem with neither href nor tag gains as="div", because bestax's Navbar.Item
and Dropdown.Item default to an <a>. An empty or false href selected nothing in bloomer
and is dropped. bestax's Panel.Block is an <a> by default and a <div> or a <label>
through as, so a PanelBlock with no href becomes <Panel.Block as="div">, or
as="label" for tag="label", and one with tag="a" a bare <Panel.Block>. One on any
other tag stays the plain block, on that tag, that bloomer rendered. A dynamic tag becomes
a plain <div class="panel-block"> with a prop:tag TODO, since the codemod can't tell which
tag it names.
A dynamic href={expr} was a runtime decision bloomer made and bestax's as is one element or
the other. It resolves to the anchor, which is the branch the href is there for, and the
prop:href TODO names the element to render by hand for the empty case:
<Button href={p.url} tag="span">x</Button>
// TODO(bestax-migrate): bloomer chose the element at runtime … render <span> by hand where
// the `href` is empty
<Button href={p.url} as="a">x</Button>Everywhere else the element wins. MenuLink and NavbarLink rendered their tag whatever
href said, so <MenuLink href="/x" tag="span"> really was a <span href="/x"> — which
navigates nowhere in any browser. The element stays and the attribute that did nothing goes,
with a prop:href TODO. The same happens to a component that becomes plain markup: a
<TabLink href="#one" tag="span"> becomes a <span>, and its href is named rather than
written. Where the link was the intent, drop the tag.
Helper props on parts that take none
A few bestax parts extend only React's HTML attributes and take no Bulma helper props at all:
Pagination.Previous/Next/Ellipsis, Navbar.Dropdown/DropdownMenu/Divider,
Panel.Heading/Tabs/Block, Tabs.Item, Message.Header/Body and the Modal
parts. A bloomer helper on one of those becomes the Bulma class in className, except on
Dropdown.Divider, which takes no props at all, and on Pagination.Ellipsis where the run can't
show the project gets bestax-bulma 5.78.4 or later, since an older release writes a className
in place of .pagination-ellipsis: there the helper is named in a TODO instead, and an element
carrying a spread is left as bloomer's. The project gets 5.78.4 when the package around the file
declares @allxsmith/bestax-bulma at a range that can't resolve below it in dependencies or
devDependencies, or declares none and the run adds it. The run doesn't read an override that
pins bestax-bulma lower, so check one by hand. Otherwise it is the Bulma class in className (is-pulled-right,
m-0, is-hidden-mobile, …), since Bulma v1 still ships every one of them; only a dynamic
value is flagged. The same conversion covers the modifiers bestax has no prop for anywhere —
Hero isBold, Media isSize, Subtitle isSpaced, Input isActive, PanelBlock isWrapped,
LevelItem isFlexible, NavbarDivider isBoxed, the pagination parts' isActive/isFocused.
bloomer's TabList becomes the plain <ul> it rendered, since bestax's Tabs.List adds
role="tablist" and the Tabs.Items in it aren't tabs. A helper on it whose literal value
names one class becomes that class the same way, and one set to false goes. Any other (a
dynamic value, an object, a bare isPulled) is dropped with a plain-element TODO, as on the
other components that become plain markup. A dynamic className on it stays as written, and a
helper's class beside it is named in a prop:className TODO, to merge by hand.
Refs
bloomer forwarded no refs. bestax forwards a ref from the form controls, plus Affix, AppFrame, AppFrame.Aside, AppFrame.Burger, AppFrame.Footer, AppFrame.Header, AppFrame.Main, AppFrame.Nav, Avatar, Button,
Carousel, CarouselItem, Center, ColorSwatch, Command, Command.Dialog, Command.Input, CopyButton, DataTable, DescriptionList, DescriptionList.Item, DescriptionList.Label, DescriptionList.Value, Dialog, Dropdown, EmptyState, Flex, FloatButton, FloatButton.BackToTop, FloatButton.SpeedDial, FloatButtons, Group, IconButton, Kbd, Kbd.Group, Lightbox, Lightbox.Trigger, Link,
LinkButton, Loader, LocaleProvider, Menu.Item, Modal, Navbar, Navbar.Burger, Navbar.Dropdown,
Navbar.Item, Navbar.Link, NumberFormatter, RingProgress, ScrollArea, SegmentedControl, SegmentedControl.Segment, Sidebar, Splitter, Splitter.Pane, Stack, Stat, Stat.Change, Stat.Description, Stat.Label, Stat.Value, Stats, TableOfContents, Timeline,
Timeline.Item, Toast, ToggleButton, Tour, Tour.Back, Tour.Next, Tour.Skip, Tour.Step, TreeView and TreeView.Item — pass ref directly on
those. "The form controls" means the inputs themselves: the Field, Field.Label, Field.Body,
Checkboxes and Radios wrappers around them forward nothing.
A ref on anything else is unsupported, and the two React majors fail differently: React 18
drops it and logs "Function components cannot be given refs", while React 19 hands it to the
component as an ordinary prop, where it settles wherever the rest props go. bestax supports
both, so attach the ref to an element you control instead.