# Bestax-Bulma
> A Bulma React component library. LLM-friendly documentation for @allxsmith/bestax-bulma.
This file contains all documentation content in a single document following the llmstxt.org standard.
## Quick Start
## Create a Bestax App
The fastest way to get started. The scaffolder sets up a Vite + React project with bestax-bulma and CSS pre-configured:
```bash
pnpm create bestax@latest my-bestax-app
cd my-bestax-app
pnpm install
pnpm dev
```
:::info CSS is included automatically
The scaffolder configures `bestax.css` for you — a single stylesheet that includes both Bulma and all bestax extras. No manual CSS setup needed.
:::
That's it! Visit http://localhost:5173 to see your app. Skip ahead to [Next Steps](#next-steps), or keep reading to add bestax to an existing project.
---
## Add to an Existing Project
### Install Dependencies
```bash
pnpm add @allxsmith/bestax-bulma
```
### Add Bestax CSS
Import the combined stylesheet in your application entry point (e.g. `main.jsx`, `main.tsx`, `index.js`):
```js
```
This single import includes both Bulma base styles and all bestax extras.
:::tip Already using Bulma?
If you already import Bulma CSS separately, you can keep that and just add the extras:
```js
```
:::
---
## Use Your First Component
Replace `src/App.jsx` (or add to your existing app):
```jsx title="src/App.jsx"
function App() {
const [showAlert, setShowAlert] = useState(false);
return (
Welcome to bestax-bulma!
{showAlert && (
Great! You're ready to build with bestax-bulma.
)}
);
}
export default App;
```
---
## Run Your App
```bash
pnpm dev
```
Visit http://localhost:5173 to see your app running.
---
## Next Steps
- [Installation Options](/docs/guides/getting-started/installation) -- Icon libraries, CDN, custom Bulma builds, and more
- [Extra Components](/docs/guides/library/components) -- Toast, Dialog, Slider, Switch, and other extras
- [Toolchains](/docs/guides/getting-started/react-setups) -- Next.js, TypeScript, and Create React App guides
- [Browse Components](/docs/category/elements) -- Full API docs and live examples
---
## Custom Component
# Custom Component skill
The [`bestax-custom-component`](https://github.com/allxsmith/bestax/blob/main/skills/bestax-custom-component/SKILL.md)
skill teaches an agent to build a new custom component the bestax way — starting by
**checking whether a matching component already exists**, then the helper hooks and the Bulma v1
SCSS pattern, plus stories, tests, and docs.
## Install
```bash
npx skills add https://github.com/allxsmith/bestax --skill bestax-custom-component
```
## Example
An agent was asked to build a `ProfileCard` and followed the skill.
### Prompt
```text
Build a ProfileCard component — avatar on top, then name, role, and a short
description — following the bestax custom-component skill.
```
:::info What the skill checked first
There is no `ProfileCard` in the library — but `Card`, `Image`, `Title`, `SubTitle`, and
`Content` already exist. So rather than reinventing them, `ProfileCard` is a new component that
**composes** the existing elements and adds only its own layout. (Had the request been a "label"
or "badge", the skill would have stopped and pointed at the existing `Tag` / `Tags`.)
:::
### Live result
```tsx live
function example() {
return (
English mathematician who worked on Charles Babbage's proposed
Analytical Engine. She was the first to recognise that the machine had
applications beyond pure calculation, and published what is now regarded
as the first algorithm intended to be carried out by a machine.
British mathematician and logician who formalised the concepts of
algorithm and computation with the Turing machine. His wartime
codebreaking at Bletchley Park helped shorten the Second World War, and
he is widely considered the father of theoretical computer science.
);
}
```
### Generated code
```tsx
// Compose the existing elements rather than reinventing them.
export interface ProfileCardProps
extends
Omit, 'title' | 'color'>,
BulmaClassesProps {
name: string;
role?: string;
imageSrc: string;
imageAlt?: string;
}
export const ProfileCard = forwardRef(
({ name, role, imageSrc, imageAlt, className, children, ...props }, ref) => {
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
const cardClass = usePrefixedClassNames('profile-card');
const imageClass = usePrefixedClassNames('profile-card-image');
const bodyClass = usePrefixedClassNames('profile-card-body');
const combined = classNames(cardClass, bulmaHelperClasses, className);
return (
{name}
{role && (
{role}
)}
{children && {children}}
);
}
);
ProfileCard.displayName = 'ProfileCard';
export default ProfileCard;
```
```scss
@use 'bulma/sass/utilities/initial-variables' as iv;
@use 'bulma/sass/utilities/css-variables' as cv;
$profile-card-width: 20rem !default;
$profile-card-min-height: 26rem !default;
$profile-card-avatar-size: 9rem !default;
$profile-card-background: cv.getVar('scheme-main') !default;
$profile-card-border: cv.getVar('border-weak') !default;
$profile-card-radius: cv.getVar('radius-large') !default;
$profile-card-shadow: 0 0.5em 1em -0.125em hsla(0, 0%, 4%, 0.1) !default;
$profile-card-padding: 1.5rem !default;
$profile-card-gap: 0.75rem !default;
.#{iv.$class-prefix}profile-card {
@include cv.register-vars(
(
'profile-card-width': #{$profile-card-width},
'profile-card-min-height': #{$profile-card-min-height},
'profile-card-avatar-size': #{$profile-card-avatar-size},
'profile-card-background': #{$profile-card-background},
'profile-card-border': #{$profile-card-border},
'profile-card-radius': #{$profile-card-radius},
'profile-card-shadow': #{$profile-card-shadow},
'profile-card-padding': #{$profile-card-padding},
'profile-card-gap': #{$profile-card-gap},
)
);
}
.#{iv.$class-prefix}profile-card {
display: flex;
flex-direction: column;
align-items: center; // horizontal centering of the column
text-align: center;
width: cv.getVar('profile-card-width');
min-height: cv.getVar('profile-card-min-height');
max-width: 100%;
gap: cv.getVar('profile-card-gap');
padding: cv.getVar('profile-card-padding');
background-color: cv.getVar('profile-card-background');
border: 1px solid cv.getVar('profile-card-border');
border-radius: cv.getVar('profile-card-radius');
box-shadow: cv.getVar('profile-card-shadow');
}
.#{iv.$class-prefix}profile-card-image {
display: flex;
justify-content: center;
}
// Enlarge the composed avatar and crop (not stretch) the portrait to a circle.
.#{iv.$class-prefix}profile-card-image .#{iv.$class-prefix}image {
width: cv.getVar('profile-card-avatar-size');
height: cv.getVar('profile-card-avatar-size');
}
.#{iv.$class-prefix}profile-card-image .#{iv.$class-prefix}image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.#{iv.$class-prefix}profile-card-body {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
```
```tsx
Wrote the first algorithm intended to be carried out by a machine.
;
```
:::note
`ProfileCard` is an **example** produced by the skill — it is not part of the published
`@allxsmith/bestax-bulma` package. The point is the _pattern_ (check first, compose existing
elements, follow the SCSS convention, then **inspect it in a browser** to confirm spacing and
alignment). See the full skill on
[GitHub](https://github.com/allxsmith/bestax/tree/main/skills/bestax-custom-component).
:::
---
## Form
# Form skill
The [`bestax-form`](https://github.com/allxsmith/bestax/blob/main/skills/bestax-form/SKILL.md)
skill teaches an agent to build forms with the bestax form components. There is **no form
library** — state is plain React, and errors surface via `color="danger"` + `message` +
`messageColor`.
## Install
```bash
npx skills add https://github.com/allxsmith/bestax --skill bestax-form
```
## Signup & validation
### Prompt
```text
Build a signup form (name, email, country) that validates on submit and shows
inline errors — no form library — following the bestax form skill.
```
### Live form
Click **Create account** with empty fields to see the validation.
```tsx live
function example() {
const [name, setName] = useState('');
const [email, setEmail] = useState('');
const [country, setCountry] = useState('');
const [submitted, setSubmitted] = useState(false);
const errors = {
name: !name.trim() ? 'Name is required.' : undefined,
email: !/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)
? 'Enter a valid email.'
: undefined,
country: !country ? 'Pick a country.' : undefined,
};
const show = k => (submitted ? errors[k] : undefined);
return (
);
}
```
### Validation pattern
Own the state, compute errors, and reflect them on each field with `color="danger"` (colors the
input), `message` (the help text), and `messageColor="danger"` (colors the help text).
## Account settings
### Prompt
```text
Build an account settings form with a bio, a timezone select, an email-digest
radio group, interest checkboxes, and toggle switches — following the bestax
form skill.
```
### Live form
```tsx live
function example() {
const [bio, setBio] = useState('');
const [timezone, setTimezone] = useState('utc');
const [digest, setDigest] = useState('weekly');
const [interests, setInterests] = useState(['react']);
const [darkMode, setDarkMode] = useState(true);
const [twoFactor, setTwoFactor] = useState(false);
return (
);
}
```
### Grouped controls
`Checkboxes` manages an **array** value; `Radios` manages a **single** value. Each child carries a
`value`, and the group reports the selection through `onChange`.
## Advanced inputs
### Prompt
```text
Build a freelancer profile form using the advanced inputs: autocomplete, slider,
number input, star rating, and tag input — following the bestax form skill.
```
### Live form
```tsx live
function example() {
const [skill, setSkill] = useState('');
const [experience, setExperience] = useState(5);
const [rateUsd, setRateUsd] = useState(75);
const [quality, setQuality] = useState(4);
const [tags, setTags] = useState(['typescript']);
return (
setSkill(typeof item === 'string' ? item : (item?.value ?? ''))
}
data={['React', 'Vue', 'Svelte', 'Angular']}
openOnFocus
/>
setTags(next.map(t => (typeof t === 'string' ? t : t.value)))
}
data={['typescript', 'node', 'graphql', 'css']}
/>
);
}
```
### Wiring notes
`Autocomplete` reports typing via `onInput` and a chosen suggestion via `onSelect`. `Taginput`'s
`onChange` yields tag objects-or-strings, so map them when you store plain strings. A dual-thumb
`Slider` needs the `range` prop.
## Files & scheduling
### Prompt
```text
Build an onboarding form with a file upload plus date, time, and date-time
pickers — following the bestax form skill.
```
### Live form
```tsx live
function example() {
const [date, setDate] = useState(null);
const [time, setTime] = useState(null);
const [appt, setAppt] = useState(null);
return (
);
}
```
### Controlled date & time
The date/time inputs are controlled with a `Date | null` value and an `onChange(date)` handler,
just like the text inputs — only the widget differs.
---
## Skills
# Bestax Agent Skills
Drop-in [Agent Skills](https://skills.sh/) that teach coding agents — Claude Code, Cursor, and
other skills.sh-compatible tools — how to build with **@allxsmith/bestax-bulma** the right way.
Install one with the [`skills`](https://skills.sh/) CLI:
```bash
npx skills add https://github.com/allxsmith/bestax --skill bestax-custom-component
npx skills add https://github.com/allxsmith/bestax --skill bestax-form
npx skills add https://github.com/allxsmith/bestax --skill bestax-theming
npx skills add https://github.com/allxsmith/bestax --skill bestax-layout-scaffold
```
Starting a new app? `pnpm create bestax@latest` offers to **preinstall these skills** into the
generated app's `.claude/skills/` (alongside a `CLAUDE.md`), so a Claude Code session picks them up
automatically — no manual `skills add` needed.
Then explore each skill — what it does, how to install it, and live examples:
- **[Custom Component](./custom-component)** — build a new custom component the bestax way
(check for an existing one first, then the helper hooks + Bulma v1 SCSS pattern).
- **[Form](./form)** — build forms with the bestax form components and the validate-it-yourself
error pattern (no form library).
- **[Theming](./theming)** — customize colors, branding, and dark mode by overriding Bulma's
`--bulma-*` variables with the `Theme` component.
- **[Layout scaffold](./layout-scaffold)** — go from "build me a dashboard / landing page / catalog"
to a complete responsive page using the layout archetypes.
---
## Layout scaffold
# Layout scaffold skill
The [`bestax-layout-scaffold`](https://github.com/allxsmith/bestax/blob/main/skills/bestax-layout-scaffold/SKILL.md)
skill turns a high-level request — "admin dashboard", "landing page", "login screen", "product
catalog" — into a complete, responsive page built from bestax-bulma layout components, in one shot.
It maps the request to one of four archetypes and builds it without asking layout questions.
## Install
```bash
npx skills add https://github.com/allxsmith/bestax --skill bestax-layout-scaffold
```
## App shell with sidebar
### Prompt
```text
Build an admin dashboard shell with a fixed top nav and a sidebar menu —
following the bestax layout-scaffold skill.
```
### Live result
The shell structure — a `Navbar`, a narrow `Menu` column, and a main content column. This preview
uses a **non-fixed** navbar; the shippable version uses `fixed="top"` (see Generated code), which
needs `position: fixed` and a page-level class and therefore can't render inside this embed.
```tsx live
function example() {
const [menuOpen, setMenuOpen] = useState(false);
return (
<>
Acme Admin setMenuOpen(open => !open)}
aria-label="menu"
/>
AccountDashboard
Main content area.
>
);
}
```
### Generated code
The shippable version adds `fixed="top"` and the required `has-navbar-fixed-top` class on ``
(see `examples/app-shell.tsx`).
```tsx
Navbar,
Menu,
Container,
Columns,
Column,
Section,
Title,
Box,
} from '@allxsmith/bestax-bulma';
export default function AdminShell() {
const [menuOpen, setMenuOpen] = useState(false);
// A fixed-top navbar needs `has-navbar-fixed-top` on (Bulma requirement;
// the library does not add it for you).
useEffect(() => {
document.documentElement.classList.add('has-navbar-fixed-top');
return () =>
document.documentElement.classList.remove('has-navbar-fixed-top');
}, []);
return (
<>
Acme Admin setMenuOpen(open => !open)}
aria-label="menu"
aria-expanded={menuOpen}
/>
AccountDashboardMain content area.
>
);
}
```
### Responsive
The navbar collapses to a burger on mobile; the sidebar and content columns sit side by side on
tablet and up, and stack on mobile.
## Marketing / landing
### Prompt
```text
Build a marketing landing page with a hero, a three-feature section, and a
footer — following the bestax layout-scaffold skill.
```
### Live result
```tsx live
function example() {
return (
<>
Ship faster with Acme
The all-in-one platform for modern teams.
FastShip pages in minutes.ResponsiveLooks right on every screen.ComposableBuild from small pieces.
>
);
}
```
### Responsive
Sections stack vertically; the feature `Columns` collapse to one per row on mobile.
## Centered single-column
### Prompt
```text
Build a centered login page — following the bestax layout-scaffold skill.
```
### Live result
```tsx live
function example() {
return (
Sign in
);
}
```
### Responsive
The centered column is narrow on desktop and full width on mobile.
## Card grid / catalog
### Prompt
```text
Build a product catalog as a responsive grid of cards — following the bestax
layout-scaffold skill.
```
### Live result
```tsx live
function example() {
const items = [
{ id: 1, name: 'Aurora Lamp', price: '$48', seed: 1 },
{ id: 2, name: 'Drift Chair', price: '$220', seed: 2 },
{ id: 3, name: 'Stone Mug', price: '$18', seed: 3 },
];
return (
{items.map(item => (
A short product description.
))}
);
}
```
### Responsive
`isMultiline` wraps cards onto new rows; the `size*` props set one card per row on mobile, two on
tablet, three on desktop.
---
## Theming
# Theming skill
The [`bestax-theming`](https://github.com/allxsmith/bestax/blob/main/skills/bestax-theming/SKILL.md)
skill teaches an agent to customize colors, branding, and dark mode of an app built with
`@allxsmith/bestax-bulma`. Bulma 1.x is themed through `--bulma-*` CSS variables; recolor a brand
color by overriding its hue/saturation/lightness trio with the exported `Theme` component.
## Install
```bash
npx skills add https://github.com/allxsmith/bestax --skill bestax-theming
```
## Custom brand theme
### Prompt
```text
Set up a custom brand theme for an app built with @allxsmith/bestax-bulma —
override the brand colors and the corner radius — following the bestax theming
skill.
```
### Live result
The wrapped section below recolors via a **scoped** `` (no `isRoot`), so the override
applies only to its children.
```tsx live
function example() {
return (
Themed tag
);
}
```
:::note
This live preview pins `--bulma-primary-*`, so the demo recolors `info`/`link` to show the effect.
In a real app, override `primaryH`/`primaryS`/`primaryL` the same way to recolor the brand primary.
:::
### Generated code
```tsx
// Wrap the app once. `isRoot` writes the variables to :root globally.
export function ThemedApp({ children }: { children: React.ReactNode }) {
return (
{children}
);
}
```
```tsx
// Theme one section; the rest of the app is untouched (no `isRoot`).
export function PromoPanel() {
return (
);
}
```
Bulma derives every shade and the light/dark/invert variants from the `--bulma--h/-s/-l`
trio, so overriding the trio recolors the whole palette. Non-color tokens (radius, fonts, sizes)
go through `bulmaVars`, keyed by their real `--bulma-*` names.
## Dark mode
### Prompt
```text
Add a light/dark mode toggle to an app built with @allxsmith/bestax-bulma —
there is no shipped dark-mode component — following the bestax theming skill.
```
### Generated code
The `Theme` component drives dark mode via its `colorMode` prop — no manual DOM work.
```tsx
Theme,
Box,
Button,
Title,
Notification,
} from '@allxsmith/bestax-bulma';
type Mode = 'light' | 'dark' | 'system';
export function DarkModeToggle() {
const [mode, setMode] = useState('system');
return (
Color mode: {mode}
Components follow the current Bulma color scheme.
);
}
```
### How it works
`Theme`'s `colorMode` prop (`'light' | 'dark' | 'system'`) writes Bulma's `data-theme` attribute on
``, so the whole document follows the chosen scheme — global, even on a scoped `Theme`.
`'system'` removes the attribute so Bulma follows the OS `prefers-color-scheme`. Brand overrides
from `` still apply on top of either scheme.
:::note Why there's no live demo here
`colorMode` flips the page-level `data-theme` on `` — the same attribute this documentation
site uses for its own light/dark mode, and the embedded previews are sandboxed to the site theme.
A live toggle would flip the entire site, not a contained example. To see it: toggle this site's
dark mode (top-right of the navbar) to view components in dark, or run the **Helpers / Theme →
DarkMode** story in Storybook.
:::
---
## Components Intro
---
## Column
## Overview
The `Column` component provides a single responsive layout column using Bulma's flexbox-based column system. It supports all Bulma column size modifiers, responsive sizes and offsets, color/background helpers, "narrow" behavior, and utility/HTML props. Use together with [`Columns`](./columns.md) for powerful, declarative layouts.
---
## Import
```tsx
```
---
## Props
| Prop | Type | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| `className` | `string` | Additional CSS classes for the column. |
| `textColor` | `'primary'` \| `'link'` \| `'info'` \| `'success'` \| `'warning'` \| `'danger'` \| `'black'` \| `'black-bis'` \| `'black-ter'` \| `'grey-darker'` \| `'grey-dark'` \| `'grey'` \| `'grey-light'` \| `'grey-lighter'` \| `'white'` \| `'light'` \| `'dark'` \| `'inherit'` \| `'current'` | Text color. |
| `color` | `'primary'` \| `'link'` \| `'info'` \| `'success'` \| `'warning'` \| `'danger'` | Bulma color modifier for the column. |
| `bgColor` | `'primary'` \| `'link'` \| `'info'` \| `'success'` \| `'warning'` \| `'danger'` \| `'black'` \| `'black-bis'` \| `'black-ter'` \| `'grey-darker'` \| `'grey-dark'` \| `'grey'` \| `'grey-light'` \| `'grey-lighter'` \| `'white'` \| `'light'` \| `'dark'` \| `'inherit'` \| `'current'` | Background color. |
| `size` | number \| `'full'` \| `'half'` \| `'one-third'` \| `'two-thirds'` \| `'one-quarter'` \| ... | Column size (see Bulma docs). |
| `sizeMobile` | as above | Size for mobile breakpoint. |
| `sizeTablet` | as above | Size for tablet breakpoint. |
| `sizeDesktop` | as above | Size for desktop breakpoint. |
| `sizeWidescreen` | as above | Size for widescreen breakpoint. |
| `sizeFullhd` | as above | Size for fullhd breakpoint. |
| `offset` | as above | Offset for column. |
| `offsetMobile` | as above | Offset for mobile. |
| `offsetTablet` | as above | Offset for tablet. |
| `offsetDesktop` | as above | Offset for desktop. |
| `offsetWidescreen` | as above | Offset for widescreen. |
| `offsetFullhd` | as above | Offset for fullhd. |
| `isNarrow` | `boolean` | Column is only as wide as its content. |
| `isNarrowMobile` | `boolean` | Narrow on mobile. |
| `isNarrowTablet` | `boolean` | Narrow on tablet. |
| `isNarrowTouch` | `boolean` | Narrow on touch devices. |
| `isNarrowDesktop` | `boolean` | Narrow on desktop. |
| `isNarrowWidescreen` | `boolean` | Narrow on widescreen. |
| `isNarrowFullhd` | `boolean` | Narrow on fullhd. |
| `children` | `React.ReactNode` | Children to render inside the column. |
| ... | All Bulma helper and HTML props | (See [Helper Props](/docs/api/helpers/usebulmaclasses)) |
---
## Usage
### Basic Columns Example
This example shows the `Column` component used within a `Columns` container. Each `Column` can accept Bulma size, color, and offset props to control its width and appearance. Use this pattern for building flexible horizontal layouts with multiple columns.
```tsx live
First columnSecond columnThird columnFourth column;
```
---
### Column Sizes
This section demonstrates the various size options for columns. Sizes can be set using Bulma's fractional values or keywords like `full`, `half`, `one-third`, etc. Combine these with offset props to control the column's position within the row.
```tsx live
<>
is-four-fifthsAutoAutois-three-quartersAutoAutois-two-thirdsAutoAutois-three-fifthsAutoAutois-halfAutoAutois-two-fifthsAutoAutois-one-thirdAutoAutois-one-quarterAutoAutois-one-fifthAutoAuto
>
```
---
### 12 Column System
In Bulma's 12 column system, you can specify column sizes from 1 to 12, allowing for a wide range of layout possibilities. This example demonstrates how each column size behaves, including automatic sizing for remaining space.
```tsx live
<>
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(num => (
{num === 1 ? 1 : `is-${num}`}
{num === 11 && (
1
)}
{num < 11 && (
Auto
)}
{num < 10 && (
Auto
)}
))}
>
```
---
### Responsive Column Sizes
Columns can have different sizes at different breakpoints, allowing for a fully responsive design. This example shows a column that changes size from mobile to desktop views.
```tsx live
sizeMobile="three-quarters"sizeTablet="two-thirds"sizeDesktop="half"sizeWidescreen="one-third"sizeFullhd="one-quarter"2345
```
---
### Offsets
Offsets are used to push columns to the right, creating space between columns. This is particularly useful for centering columns or creating specific layouts.
```tsx live
<>
is-half is-offset-one-quarter
is-three-fifths is-offset-one-fifth
is-4 is-offset-8is-11 is-offset-1
>
```
---
### Narrow Columns
Narrow columns only take up as much width as their content, which can be useful for sidebar menus, buttons, or any content that doesn't need to stretch the full width of the column.
```tsx live
Narrow column
This column is only as wide as it needs to be, 180px wide.
Flexible column
This column will take up the remaining space available.
```
---
## Notes
- Use the `Columns` component as a parent for `Column` children for proper row-column behavior.
- All column, offset, and narrow props support responsive variants.
- Combine with [Bulma helper props](/docs/api/helpers/usebulmaclasses) for utility-first styling.
- All standard `` HTML props are supported.
---
## See Also
- [Columns container](./columns.md)
- [Bulma Columns Documentation](https://bulma.io/documentation/columns/)
- [Storybook: Column Story](https://bestax.io/storybook/?path=/story/columns-column--default)
---
## Columns
## Overview
The `Columns` component provides Bulma's flexible, responsive grid container for aligning and distributing [`Column`](./column.md) components. It supports wrapping, gap control, centering, vertical alignment, responsive breakpoints, and all Bulma/utility helper props. Use it as the parent for one or more `Column` children.
---
## Import
```tsx
```
---
## Props
| Prop | Type | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| `className` | `string` | Additional CSS classes for the columns container. |
| `textColor` | `'primary'` \| `'link'` \| `'info'` \| `'success'` \| `'warning'` \| `'danger'` \| `'black'` \| `'black-bis'` \| `'black-ter'` \| `'grey-darker'` \| `'grey-dark'` \| `'grey'` \| `'grey-light'` \| `'grey-lighter'` \| `'white'` \| `'light'` \| `'dark'` \| `'inherit'` \| `'current'` | Text color. |
| `color` | `'primary'` \| `'link'` \| `'info'` \| `'success'` \| `'warning'` \| `'danger'` | Bulma color modifier for all columns. |
| `bgColor` | `'primary'` \| `'link'` \| `'info'` \| `'success'` \| `'warning'` \| `'danger'` \| `'black'` \| `'black-bis'` \| `'black-ter'` \| `'grey-darker'` \| `'grey-dark'` \| `'grey'` \| `'grey-light'` \| `'grey-lighter'` \| `'white'` \| `'light'` \| `'dark'` \| `'inherit'` \| `'current'` | Background color for all columns. |
| `isCentered` | `boolean` | Horizontally center columns within the container. |
| `isGapless` | `boolean` | Remove gap between columns. |
| `isMultiline` | `boolean` | Allow columns to wrap to multiple lines. |
| `isVCentered` | `boolean` | Vertically center columns within the container. |
| `isMobile` | `boolean` | Apply columns layout on mobile and up. |
| `isDesktop` | `boolean` | Apply columns layout on desktop and up. |
| `gapSize` | number \| string (0-8) | Gap size for all breakpoints. |
| `gapSizeMobile` | number \| string (0-8) | Gap size for mobile. |
| `gapSizeTablet` | number \| string (0-8) | Gap size for tablet. |
| `gapSizeDesktop` | number \| string (0-8) | Gap size for desktop. |
| `gapSizeWidescreen` | number \| string (0-8) | Gap size for widescreen. |
| `gapSizeFullhd` | number \| string (0-8) | Gap size for fullhd. |
| `children` | `React.ReactNode` | Columns to render within the container. |
| ... | All Bulma helper and HTML props | (See [Helper Props](../api/helpers/usebulmaclasses)) |
---
## Usage
### Basic Columns
This example shows the `Columns` component containing multiple `Column` children. Each `Column` can contain any content, and the columns will be distributed evenly across the container. Use this pattern for flexible horizontal layouts.
```tsx live
First columnSecond columnThird columnFourth column
```
---
### Columns on Mobile and Desktop
This example demonstrates the `isMobile` prop, which enables the columns layout on mobile screens and up. Use this to ensure your layout is responsive and adapts to smaller devices.
```tsx live
<>
{
// Columns enabled on mobile screens and up
}
12345
{
// Columns enabled on desktop screens and up
}
12345
>
```
---
### Different Column Sizes Per Breakpoint
This example demonstrates how to set different column sizes for various breakpoints using the `size` props. This allows for a highly responsive design that can adapt to different screen sizes.
```tsx live
sizeMobile="three-quarters"sizeTablet="two-thirds"sizeDesktop="half"sizeWidescreen="one-third"sizeFullhd="one-quarter"2345
```
---
### Nested Columns
This example shows how columns can be nested within each other. Nested columns inherit the properties of their parent columns, allowing for complex and flexible layouts.
```tsx live
First columnFirst nested columnSecond nested columnSecond column50%AutoAuto
```
---
### Gap Sizes & Responsive Gaps
This example demonstrates the use of the `gapSize` prop to control the space between columns. Responsive gap sizes can also be set for different screen sizes.
```tsx live
<>
gapSize=0
gapSize=0
gapSize=3gapSize=3
gapSizeMobile=1 gapSizeTablet=3 gapSizeDesktop=6
gapSizeMobile=1 gapSizeTablet=3 gapSizeDesktop=6
>
```
---
### Offsets
This example shows how to use the `offset` prop to create space between columns. Offsets can be used to center columns or create more complex layouts.
```tsx live
<>
size="half" offset="one-quarter"size="three-fifths" offset="one-fifth"
size={4} offset={8}
size=11 offset=1
>
```
---
### Narrow Columns
This example demonstrates the `isNarrow` prop, which can be applied to columns to make them take up only as much space as their content. This is useful for sidebar or menu columns.
```tsx live
Narrow column
This column is only 200px wide.
Flexible column
This column will take up the remaining space available.
```
---
### Gapless Columns
This example shows how to create columns without any gaps between them using the `isGapless` prop. This can be useful for creating a more seamless look.
```tsx live
1
2
3
4
```
---
### Multiline and Gapless
This example demonstrates using the `isMultiline` and `isGapless` props together. This allows for a grid that wraps onto multiple lines without any gaps between the columns.
```tsx live
is-one-quarter
is-one-quarter
is-one-quarter
is-one-quarter
is-half
is-one-quarter
is-one-quarter
is-one-quarter
Auto
```
---
### Variable Gap
This example demonstrates how to use the `gapSize` prop to create columns with variable widths. This can be useful for creating layouts with sidebars or varying content widths.
```tsx live
<>
Side
Main
Three columns
Three columns
Three columns
{Array.from({ length: 6 }).map((_, i) => (
{i + 1}
))}
>
```
---
### Breakpoint Based Column Gaps
This example shows how to set different gap sizes for different breakpoints. This allows for fine-tuned control over the layout on various screen sizes.
```tsx live
{[...Array(3)].map((_, idx) => (
Column
))}
```
---
### Vertical Alignment
This example demonstrates the `isVCentered` prop, which vertically centers the content of the columns. This can be useful for creating evenly aligned layouts.
```tsx live
First column
Can you see the vertical alignment? It should be really noticable with
these two columns.
```
---
### Multiline Columns
This example shows how columns can automatically wrap onto multiple lines when there isn't enough space to display them in a single line. This is controlled by the `isMultiline` prop.
```tsx live
is-one-quarteris-one-quarteris-one-quarteris-one-quarteris-halfis-one-quarteris-one-quarteris-one-quarterAuto
```
---
### Centering Columns
This example demonstrates the `isCentered` prop, which horizontally centers the columns within the container. This is particularly useful for creating balanced layouts.
```tsx live
is-half
```
---
### Multiline Centered Columns
This example shows how to combine the `isCentered` prop with multiline columns. This allows for a centered, responsive grid that adapts to different screen sizes.
```tsx live
is-narrow
First Column
is-narrow
Our Second Column
is-narrow
Third Column
is-narrow
The Fourth Column
is-narrow
Fifth Column
```
---
## Notes
- Use `Column` as a direct child of `Columns` for proper grid behavior.
- All gap, centering, and alignment props support responsive variants.
- Combine with [Bulma helper props](../api/helpers/usebulmaclasses) for utility-first styling.
- All standard `` HTML props are supported.
---
## See Also
- [Column component](./column.md)
- [Bulma Columns Documentation](https://bulma.io/documentation/columns/)
- [Storybook: Columns Story](https://bestax.io/storybook/?path=/story/columns-columns--mobile-columns)
---
## Breadcrumb
## Overview
The `Breadcrumb` component renders a Bulma-styled breadcrumb navigation. It supports alignment, separator styles, sizes, and works naturally with icons and text. Use it to help users understand their location in an app or website.
---
## Import
```tsx
```
---
## Props
| Prop | Type | Description |
| ----------- | -------------------------------------------- | -------------------------------------------------------- |
| `className` | `string` | Additional CSS classes to apply. |
| `alignment` | `'centered' \| 'right'` | Alignment of the breadcrumb (`is-centered`, `is-right`). |
| `separator` | `'arrow' \| 'bullet' \| 'dot' \| 'succeeds'` | Type of separator between breadcrumb items. |
| `size` | `'small' \| 'medium' \| 'large'` | Breadcrumb size. |
| `children` | `React.ReactNode` | Breadcrumb items (``s with `` or ``). |
| ... | All standard HTML and Bulma helper props | (See [Helper Props](../helpers/usebulmaclasses)) |
---
## Usage
### Default Breadcrumb
To create a navigation trail, use the `Breadcrumb` component with a series of `` elements as children. You can include icons, text, and links for each breadcrumb item. This pattern helps users understand their current location within the app and easily navigate back to previous sections. Customize the appearance using props like `alignment`, `separator`, and `size` for different layouts and styles.
```tsx live
Home
Category
Item
```
---
### Centered Alignment
Set the `alignment` prop to `centered` to center the breadcrumb navigation horizontally. This is useful for layouts where you want the navigation to be visually balanced in the middle of the page or section. All other features, such as icons and separators, remain available.
```tsx live
Home
Category
Item
```
---
### Right Alignment
Use the `alignment` prop with the value `right` to align the breadcrumb navigation to the right edge of its container. This is helpful for layouts where navigation should be flush with the right margin, such as in toolbars or headers.
```tsx live
Home
Category
Item
```
---
### Arrow Separator
Set the `separator` prop to `arrow` to use arrow icons between breadcrumb items. This style is visually clear and works well for step-by-step navigation.
```tsx live
Home
Category
Item
```
---
### Bullet Separator
Use the `separator` prop with the value `bullet` to display bullet points between breadcrumb items. This provides a subtle, minimalist look for navigation trails.
```tsx live
Home
Category
Item
```
---
### Dot Separator
Set the `separator` prop to `dot` to use dot separators between breadcrumb items. This style is clean and works well for compact navigation.
```tsx live
Home
Category
Item
```
---
### Succeeds Separator
Use the `separator` prop with the value `succeeds` to show a chevron-style separator between breadcrumb items. This is another option for visually indicating progression.
```tsx live
Home
Category
Item
```
---
### Small Size
Set the `size` prop to `small` to render a compact breadcrumb navigation. This is useful for tight layouts or when breadcrumbs are a secondary navigation element.
```tsx live
Home
Category
Item
```
---
### Medium Size
Use the `size` prop with the value `medium` to increase the breadcrumb's size for better visibility or emphasis in your layout.
```tsx live
Home
Category
Item
```
---
### Large Size
Set the `size` prop to `large` to make the breadcrumb navigation more prominent. This is ideal for main navigation or when breadcrumbs need to stand out.
```tsx live
Home
Category
Item
```
---
### With Icons, Alignment, Separator, Size, and Text Weight
Combine multiple props such as `alignment`, `separator`, `size`, and `textWeight` to fully customize the breadcrumb's appearance. You can also use the `textColor` and `size` props on the `Icon` component for even more control over the look of each breadcrumb item.
```tsx live
{' '}
Home
{' '}
Category
{' '}
Item
```
---
## Accessibility
- The root is a `