create-bestax 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bestax",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Create a new bestax-bulma project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,8 +29,12 @@ call.
29
29
 
30
30
  Where to look:
31
31
 
32
- - `bulma-ui/src/index.ts` — the full export list; scan it for the name and its synonyms.
33
- - `docs/docs/api/{elements,components,form}/` one doc page per shipped component.
32
+ - `references/component-catalog.md` — **start here.** Every documented component with a one-line
33
+ purpose, grouped by category (generated from the API docs). Scan it for the name and its
34
+ synonyms before anything else.
35
+ - `bulma-ui/src/index.ts` — the full export list; check here for anything not yet documented (e.g.
36
+ raw `*Base` form variants) that the catalog omits.
37
+ - `docs/docs/api/{elements,components,form}/` — one doc page per shipped component (full props).
34
38
  - Storybook titles — `Elements/*`, `Components/*`, `Form/*`.
35
39
 
36
40
  Then decide, and **surface the decision to the user**:
@@ -103,7 +107,7 @@ export const MyComponent = forwardRef<HTMLDivElement, MyComponentProps>(
103
107
  // 1. Pull Bulma helper classes (m/p, text*, display, etc.) out of props.
104
108
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
105
109
 
106
- // 2. Build this component's own classes (respects the Config classPrefix).
110
+ // 2. Build this component's own classes (respects the ConfigProvider classPrefix).
107
111
  const mainClasses = usePrefixedClassNames('mycomponent', {
108
112
  [`is-${color}`]: !!color,
109
113
  [`is-${size}`]: !!size,
@@ -131,7 +135,7 @@ Rules that keep components consistent:
131
135
  - **Always `Omit<…, 'color'>`** from both `HTMLAttributes` and `BulmaClassesProps` when the
132
136
  component exposes its own typed `color`, so the native/helper `color` doesn't collide.
133
137
  - **Never hand-build class strings.** Use `usePrefixedClassNames(base, conditionalMap)` so the
134
- optional `classPrefix` from `Config` is honored, then `classNames(...)` to merge.
138
+ optional `classPrefix` from `ConfigProvider` is honored, then `classNames(...)` to merge.
135
139
  - **Spread `rest`, not `props`**, onto the DOM node — `useBulmaClasses` has already stripped the
136
140
  helper props out of `rest`, so they don't leak to the DOM as invalid attributes.
137
141
  - **Set `displayName`** on `forwardRef` components (needed for tests and Storybook autodocs).
@@ -199,7 +203,7 @@ $mycomponent-padding: 1rem !default;
199
203
  ```
200
204
 
201
205
  Why this matters: registering vars makes the component themeable at runtime (the docs site and
202
- `Theme`/`Config` providers override `--bulma-*` properties), and the `iv.$class-prefix` keeps
206
+ `Theme`/`ConfigProvider` providers override `--bulma-*` properties), and the `iv.$class-prefix` keeps
203
207
  the component working when consumers opt into a class prefix to avoid collisions.
204
208
 
205
209
  The canonical reference file is `bulma-ui/src/scss/components/_dialog.scss`.
@@ -37,7 +37,7 @@ Accepts strings, numbers, arrays, and objects (truthy keys included); flattens r
37
37
  de-dupes. Related exports:
38
38
 
39
39
  - `usePrefixedClassNames(...args)` — **use this in components.** Reads `classPrefix` from the
40
- `Config` context and prefixes every class. With `classPrefix="bulma-"`,
40
+ `ConfigProvider` context and prefixes every class. With `classPrefix="bulma-"`,
41
41
  `usePrefixedClassNames('button', { 'is-primary': true })` → `'bulma-button bulma-is-primary'`.
42
42
  - `prefixedClassNames(prefix, ...args)` — non-hook form; pass `undefined` for no prefix.
43
43
  - `createPrefixedClassNames(prefix)` — factory returning a bound `classNames`.
@@ -57,10 +57,11 @@ Storybook `argTypes`/tests:
57
57
  export type MyColor = (typeof validColors)[number];
58
58
  ```
59
59
 
60
- ## `Config` / `Theme` — `helpers/Config.tsx`, `helpers/Theme.tsx`
60
+ ## `ConfigProvider` / `Theme` — `helpers/Config.tsx`, `helpers/Theme.tsx`
61
61
 
62
- `Config` provides the runtime `classPrefix` consumed by `usePrefixedClassNames` (opt-in class
63
- prefixing to avoid collisions). `Theme` overrides `--bulma-*` custom properties at runtime —
62
+ `ConfigProvider` provides the runtime `classPrefix` (and `iconLibrary`) consumed via `useConfig`;
63
+ `classPrefix` feeds `usePrefixedClassNames` (opt-in class prefixing to avoid collisions). `Theme`
64
+ overrides `--bulma-*` custom properties at runtime —
64
65
  which is exactly why component SCSS must register its vars via `cv.register-vars` rather than
65
66
  hard-coding values.
66
67
 
@@ -0,0 +1,125 @@
1
+ <!-- GENERATED by scripts/gen-component-catalog.mjs — do not edit by hand. -->
2
+ <!-- Regenerate with `npm run gen:catalog`. Source: docs/docs/api/**. -->
3
+
4
+ # Component catalog
5
+
6
+ Every **documented** component of `@allxsmith/bestax-bulma`, so you **don't
7
+ reinvent one that already exists**. Import everything from the package root
8
+ (`@allxsmith/bestax-bulma`). Scan this list first; if a component fits, use it
9
+ instead of hand-writing markup.
10
+
11
+ - **Full props are not listed here** (that would be too large to keep in context).
12
+ Follow a component's link for its complete prop table, or see the per-skill
13
+ references. Every component also accepts the shared Bulma **helper props**
14
+ (`m`/`p` spacing, `textColor`/`bgColor`, `textAlign`, `display`, flex, …) —
15
+ documented once in `references/api.md`.
16
+ - **Compound components** expose sub-parts via dot access (e.g. `Card.Header`,
17
+ `Navbar.Item`, `Tabs.Tab`, `Hero.Body`); see the component's linked page for the
18
+ full set.
19
+ - Raw `*Base` form exports (`InputBase`, `SelectBase`, `TextAreaBase`, …) are
20
+ escape-hatch variants of the convenience wrappers above them; see the Form docs.
21
+
22
+ 81 documented components. Generated from the API docs — every exported
23
+ component is guaranteed to appear (the generator fails if one lacks an API page).
24
+
25
+ ## Elements
26
+
27
+ - [Block](https://bestax.io/docs/api/elements/block) — The `Block` component renders a simple container with Bulma's `.block` class, adding vertical margin between sections of content.
28
+ - [Box](https://bestax.io/docs/api/elements/box) — The `Box` component renders a bordered, padded container with an optional shadow using Bulma's `.box` class.
29
+ - [Button](https://bestax.io/docs/api/elements/button) — The `Button` component provides a flexible and highly customizable button for your Bulma React UI.
30
+ - [Buttons](https://bestax.io/docs/api/elements/buttons) — The `Buttons` component lets you group multiple `Button` elements together with Bulma's spacing, alignment, and add-on features.
31
+ - [Code](https://bestax.io/docs/api/elements/code) — The `Code` component renders a styled `<code>` element with Bulma helper class integration.
32
+ - [Content](https://bestax.io/docs/api/elements/content) — The `Content` component applies Bulma’s typographic styles to its children, enhancing the appearance of HTML elements like paragraphs, headings, lists…
33
+ - [Delete](https://bestax.io/docs/api/elements/delete) — The `Delete` component provides a Bulma-styled close/delete button for dismissing modals, notifications, tags, messages, and more.
34
+ - [Divider](https://bestax.io/docs/api/elements/divider) — The `Divider` component renders a styled horizontal rule (`<hr>`) element with Bulma helper class integration.
35
+ - [Emphasis](https://bestax.io/docs/api/elements/emphasis) — The `Emphasis` component renders a styled `<em>` element with Bulma helper class integration.
36
+ - [Figure](https://bestax.io/docs/api/elements/figure) — The `Figure` component renders a styled `<figure>` element with Bulma helper class integration.
37
+ - [Icon](https://bestax.io/docs/api/elements/icon) — The `Icon` component is a Bulma-styled wrapper for displaying icons from various libraries (Font Awesome, Material Design Icons, Ionicons…
38
+ - [IconText](https://bestax.io/docs/api/elements/icontext) — The `IconText` component provides a Bulma-styled horizontal arrangement of one or more `Icon` components and optional text.
39
+ - [Image](https://bestax.io/docs/api/elements/image) — The `Image` component wraps images, iframes, or custom content in a Bulma-styled container, supporting fixed sizes, aspect ratios, rounded corners…
40
+ - [Link](https://bestax.io/docs/api/elements/link) — The `Link` component renders a styled anchor (`<a>`) element with Bulma helper class integration.
41
+ - [LinkButton](https://bestax.io/docs/api/elements/linkbutton) — The `LinkButton` component renders a `<button>` that visually looks like text or a link.
42
+ - [ListItem](https://bestax.io/docs/api/elements/listitem) — The `ListItem` component renders a styled list item (`<li>`) element with Bulma helper class integration.
43
+ - [Notification](https://bestax.io/docs/api/elements/notification) — The `Notification` component is a Bulma-styled alert/message area for providing feedback, warnings, or information to users.
44
+ - [OrderedList](https://bestax.io/docs/api/elements/orderedlist) — The `OrderedList` component renders a styled ordered list (`<ol>`) element with Bulma helper class integration.
45
+ - [Paragraph](https://bestax.io/docs/api/elements/paragraph) — The `Paragraph` component renders a styled `<p>` element with Bulma helper class integration.
46
+ - [Pre](https://bestax.io/docs/api/elements/pre) — The `Pre` component renders a styled `<pre>` element with Bulma helper class integration.
47
+ - [Progress](https://bestax.io/docs/api/elements/progress) — The `Progress` component displays a Bulma-styled progress bar.
48
+ - [Skeleton](https://bestax.io/docs/api/elements/skeleton) — The `Skeleton` component provides a Bulma-styled skeleton loader for React applications, useful for indicating that content is loading.
49
+ - [Span](https://bestax.io/docs/api/elements/span) — The `Span` component renders a styled inline `<span>` element with Bulma helper class integration.
50
+ - [Strong](https://bestax.io/docs/api/elements/strong) — The `Strong` component renders a styled `<strong>` element with Bulma helper class integration.
51
+ - [SubTitle](https://bestax.io/docs/api/elements/subtitle) — The `SubTitle` component renders a Bulma-styled subtitle (secondary heading), supporting sizes `1-6` and rendering as any heading or paragraph element (`h1-h6`…
52
+ - [Table](https://bestax.io/docs/api/elements/table) — The `Table` component and its subcomponents provide a highly composable, Bulma-styled table system for React.
53
+ - [Tag](https://bestax.io/docs/api/elements/tag) — The `Tag` component renders a Bulma-styled label or badge.
54
+ - [Tags](https://bestax.io/docs/api/elements/tags) — The `Tags` component groups multiple `Tag` components together in a horizontal (or multiline) Bulma-styled container.
55
+ - [Title](https://bestax.io/docs/api/elements/title) — The `Title` component renders a Bulma-styled title (heading), supporting sizes `1`-`6`, spacing, and rendering as any heading or paragraph element (`h1`-`h6`…
56
+ - [UnorderedList](https://bestax.io/docs/api/elements/unorderedlist) — The `UnorderedList` component renders a styled unordered list (`<ul>`) element with Bulma helper class integration.
57
+
58
+ ## Components
59
+
60
+ - [Breadcrumb](https://bestax.io/docs/api/components/breadcrumb) — The `Breadcrumb` component renders a Bulma-styled breadcrumb navigation.
61
+ - [Card](https://bestax.io/docs/api/components/card) — The `Card` component renders a Bulma-styled card with optional header, image, content, and footer.
62
+ - [Carousel](https://bestax.io/docs/api/components/carousel) — The `Carousel` component provides an image/content slider with navigation arrows and indicators.
63
+ - [Collapse](https://bestax.io/docs/api/components/collapse) — The `Collapse` component provides an expandable/collapsible content panel.
64
+ - [Dialog](https://bestax.io/docs/api/components/dialog) — The `Dialog` component provides confirmation and alert dialogs with customizable actions.
65
+ - [Dropdown](https://bestax.io/docs/api/components/dropdown) — The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI.
66
+ - [Loading](https://bestax.io/docs/api/components/loading) — The `Loading` component provides a loading overlay with a spinner animation.
67
+ - [Menu](https://bestax.io/docs/api/components/menu) — The `Menu` component provides Bulma's vertical navigation menu: a simple, accessible sidebar or section menu for your Bulma React UI.
68
+ - [Message](https://bestax.io/docs/api/components/message) — The `Message` component provides Bulma's flexible notice/message box for your Bulma React UI.
69
+ - [Modal](https://bestax.io/docs/api/components/modal) — The `Modal` component provides a flexible, accessible modal dialog for your Bulma React UI.
70
+ - [Navbar](https://bestax.io/docs/api/components/navbar) — The `Navbar` component implements Bulma's powerful, responsive navigation bar for your Bulma React UI.
71
+ - [Pagination](https://bestax.io/docs/api/components/pagination) — The `Pagination` component provides a flexible, composable Bulma pagination navigation for your Bulma React UI.
72
+ - [Panel](https://bestax.io/docs/api/components/panel) — The `Panel` component implements Bulma's versatile panel block for React.
73
+ - [Sidebar](https://bestax.io/docs/api/components/sidebar) — The `Sidebar` component provides a slide-out navigation panel that appears from the left or right side of the screen.
74
+ - [Steps](https://bestax.io/docs/api/components/steps) — The `Steps` component provides a multi-step progress indicator for wizard flows, checkout processes, or any multi-step workflow.
75
+ - [Tabs](https://bestax.io/docs/api/components/tabs) — The `Tabs` component provides flexible and fully-featured Bulma tab navigation for your Bulma React UI.
76
+ - [Toast](https://bestax.io/docs/api/components/toast) — The `Toast` component provides brief notification messages with optional action and cancel buttons.
77
+ - [Tooltip](https://bestax.io/docs/api/components/tooltip) — The `Tooltip` component displays helpful information when users hover over or focus on an element.
78
+
79
+ ## Form
80
+
81
+ - [Autocomplete](https://bestax.io/docs/api/form/autocomplete) — The `Autocomplete` component provides an input field with dropdown suggestions that filter based on user input.
82
+ - [Checkbox](https://bestax.io/docs/api/form/checkbox) — The `Checkbox` component provides a Bulma-styled checkbox input.
83
+ - [Checkboxes](https://bestax.io/docs/api/form/checkboxes) — The `Checkboxes` component wraps multiple `Checkbox` components in a Bulma-styled group.
84
+ - [Control](https://bestax.io/docs/api/form/control) — The `Control` component is a Bulma-styled wrapper for form controls (`Input`, `Select`, `TextArea`, etc.), supporting icons (left/right), loading state…
85
+ - [DateInput](https://bestax.io/docs/api/form/datetime/dateinput) — The `DateInput` component is a form input that opens a popover calendar for date selection.
86
+ - [DateTimeInput](https://bestax.io/docs/api/form/datetime/datetimeinput) — The `DateTimeInput` combines a calendar and a time **wheel spinner** in a single popover — an iOS-style layout.
87
+ - [Field](https://bestax.io/docs/api/form/field) — The `Field` component is a Bulma-styled form field container.
88
+ - [File](https://bestax.io/docs/api/form/file) — The `File` component provides a Bulma-styled file input, supporting color, size, boxed/fullwidth/align styles, icons, "has name", and filename display.
89
+ - [Input](https://bestax.io/docs/api/form/input) — The `Input` component provides a Bulma-styled text input, supporting colors, sizes, rounded corners, static/read-only state, hover/focus/loading states…
90
+ - [Numberinput](https://bestax.io/docs/api/form/numberinput) — The `Numberinput` component provides a number input with increment/decrement buttons.
91
+ - [Radio](https://bestax.io/docs/api/form/radio) — The `Radio` component provides a Bulma-styled radio button input with flexible labels and helper classes.
92
+ - [Radios](https://bestax.io/docs/api/form/radios) — The `Radios` component wraps multiple `Radio` components in a Bulma-styled group.
93
+ - [Rate](https://bestax.io/docs/api/form/rate) — The `Rate` component provides a star/icon-based rating system.
94
+ - [Select](https://bestax.io/docs/api/form/select) — The `Select` component provides a Bulma-styled dropdown for selecting one or more options.
95
+ - [Slider](https://bestax.io/docs/api/form/slider) — The `Slider` component provides a range slider input for selecting values within a range.
96
+ - [Switch](https://bestax.io/docs/api/form/switch) — The `Switch` component provides a toggle switch for boolean on/off states.
97
+ - [Taginput](https://bestax.io/docs/api/form/taginput) — The `Taginput` component provides a tag/chip input field for managing multiple tags.
98
+ - [TextArea](https://bestax.io/docs/api/form/textarea) — The `TextArea` component provides a Bulma-styled multi-line text input, supporting color, size, rounded corners, static/read-only state…
99
+ - [TimeInput](https://bestax.io/docs/api/form/datetime/timeinput) — The `TimeInput` component is a form input that opens a popover spinner for time-of-day selection.
100
+
101
+ ## Columns
102
+
103
+ - [Column](https://bestax.io/docs/api/columns/column) — The `Column` component provides a single responsive layout column using Bulma's flexbox-based column system.
104
+ - [Columns](https://bestax.io/docs/api/columns/columns) — The `Columns` component provides Bulma's flexible, responsive grid container for aligning and distributing [`Column`](./column.md) components.
105
+
106
+ ## Grid
107
+
108
+ - [Cell](https://bestax.io/docs/api/grid/cell) — The `Cell` component provides a single Bulma grid cell for use inside the [`Grid`](./grid.md) component.
109
+ - [Grid](https://bestax.io/docs/api/grid/grid) — The `Grid` component provides Bulma's advanced CSS Grid layout for complex, modern layouts.
110
+
111
+ ## Layout
112
+
113
+ - [Container](https://bestax.io/docs/api/layout/container) — The `Container` component provides a responsive and flexible layout wrapper for your Bulma React UI.
114
+ - [Footer](https://bestax.io/docs/api/layout/footer) — The `Footer` component provides a semantic and accessible site footer for your Bulma React UI.
115
+ - [Hero](https://bestax.io/docs/api/layout/hero) — The `Hero` component provides a responsive, flexible, and visually striking section for your Bulma React UI.
116
+ - [Level](https://bestax.io/docs/api/layout/level) — The `Level` component provides a flexible horizontal layout for your Bulma React UI, perfect for aligning items on the left and right…
117
+ - [Media](https://bestax.io/docs/api/layout/media) — The `Media` component implements Bulma’s powerful media object layout for React.
118
+ - [Section](https://bestax.io/docs/api/layout/section) — The `Section` component provides vertical spacing and visual separation for your Bulma React UI.
119
+
120
+ ## Helpers
121
+
122
+ - [ConfigProvider](https://bestax.io/docs/api/helpers/config) — The `ConfigProvider` component provides a React context for configuring global settings across all Bulma UI components.
123
+ - [Theme](https://bestax.io/docs/api/helpers/theme) — The `Theme` component provides a powerful way to customize Bulma's appearance using CSS custom properties (CSS variables).
124
+ - [classNames](https://bestax.io/docs/api/helpers/classnames) — `classNames` is a utility function for conditionally joining class names together.
125
+ - [useBulmaClasses](https://bestax.io/docs/api/helpers/usebulmaclasses) — `useBulmaClasses` is a custom React hook that generates Bulma helper class strings from a set of props.
@@ -42,6 +42,10 @@ Centered; a collection of items → Card grid. For mixed requests, pick the domi
42
42
  mobile. Add responsive `size*` props only to tune the breakpoints.
43
43
  - For a `fixed="top"` `Navbar`, add the `has-navbar-fixed-top` class to `<html>` so content is not
44
44
  hidden behind it — the library does not do this automatically.
45
+ - **Style with helper props, not inline `style`.** Use `m`/`p` spacing (`mt="4"` = 1rem),
46
+ `textAlign="centered"`, and `textColor`/`bgColor` instead of `style={{ marginTop, textAlign,
47
+ color }}`. Set the app-wide icon library once with `<ConfigProvider iconLibrary="…">` at the root
48
+ rather than `library` on every `<Icon>`.
45
49
 
46
50
  ## References
47
51
 
@@ -56,6 +60,8 @@ Centered; a collection of items → Card grid. For mixed requests, pick the domi
56
60
  - `examples/landing.tsx` — `Hero` + `Section`s + `Footer`.
57
61
  - `examples/centered.tsx` — centered single column (auth/settings).
58
62
  - `examples/card-grid.tsx` — multiline `Columns` of `Card`s (catalog).
63
+ - `examples/content-page.tsx` — hero + feature cards + CTA styled with helper props (no inline
64
+ `style`), wrapped in `ConfigProvider`.
59
65
 
60
66
  ## Checklist
61
67
 
@@ -64,3 +70,5 @@ Centered; a collection of items → Card grid. For mixed requests, pick the domi
64
70
  - [ ] Use `Columns`/`Column` for side-by-side layout; rely on the mobile stack default.
65
71
  - [ ] For a fixed navbar, add `has-navbar-fixed-top` to `<html>`.
66
72
  - [ ] Do not use `Tile` — it is not shipped.
73
+ - [ ] Style with helper props (`mt`/`p`, `textAlign`, `textColor`), not inline `style`.
74
+ - [ ] Set the icon library once via `<ConfigProvider iconLibrary="…">` at the root.
@@ -5,8 +5,12 @@
5
5
  // is padded below it — Bulma requires this and the library does NOT add it for
6
6
  // you. The columns sit side by side on tablet and up, and stack (menu above
7
7
  // content) on mobile.
8
+ //
9
+ // `ConfigProvider` wraps the shell once at the root to set the app-wide icon
10
+ // library (so <Icon> needs no `library` prop) and, optionally, a class prefix.
8
11
  import React, { useEffect, useState } from 'react';
9
12
  import {
13
+ ConfigProvider,
10
14
  Navbar,
11
15
  Menu,
12
16
  Container,
@@ -28,7 +32,7 @@ export default function AdminShell() {
28
32
  }, []);
29
33
 
30
34
  return (
31
- <>
35
+ <ConfigProvider iconLibrary="fa">
32
36
  <Navbar fixed="top" color="dark">
33
37
  <Navbar.Brand>
34
38
  <Navbar.Item href="#">Acme Admin</Navbar.Item>
@@ -75,6 +79,6 @@ export default function AdminShell() {
75
79
  </Column>
76
80
  </Columns>
77
81
  </Container>
78
- </>
82
+ </ConfigProvider>
79
83
  );
80
84
  }
@@ -0,0 +1,90 @@
1
+ // Idiomatic marketing content page: hero + feature cards + CTA.
2
+ //
3
+ // The point of this example is HOW to style with the library, not just what to
4
+ // render. Two rules it demonstrates:
5
+ // 1. `ConfigProvider` wraps the page once so <Icon> needs no `library` prop.
6
+ // 2. Spacing, alignment, and color use HELPER PROPS — never inline `style`.
7
+ // e.g. mt="4" (1rem) instead of style={{ marginTop: '1rem' }},
8
+ // textAlign="centered" instead of style={{ textAlign: 'center' }},
9
+ // textColor="grey" instead of style={{ color: '#…' }}.
10
+ import React from 'react';
11
+ import {
12
+ ConfigProvider,
13
+ Hero,
14
+ Container,
15
+ Section,
16
+ Columns,
17
+ Column,
18
+ Card,
19
+ Title,
20
+ SubTitle,
21
+ Content,
22
+ Button,
23
+ Buttons,
24
+ Icon,
25
+ IconText,
26
+ } from '@allxsmith/bestax-bulma';
27
+
28
+ const features = [
29
+ { icon: 'bolt', name: 'Fast', blurb: 'Ships lean CSS and a tiny runtime.' },
30
+ {
31
+ icon: 'shield',
32
+ name: 'Solid',
33
+ blurb: 'Typed props and tested components.',
34
+ },
35
+ {
36
+ icon: 'wand-magic-sparkles',
37
+ name: 'Themeable',
38
+ blurb: 'Recolor with CSS variables.',
39
+ },
40
+ ];
41
+
42
+ export default function ContentPage() {
43
+ return (
44
+ <ConfigProvider iconLibrary="fa">
45
+ <Hero color="primary" size="medium">
46
+ <Hero.Body>
47
+ <Container textAlign="centered">
48
+ <Title size="1">Build faster with bestax</Title>
49
+ <SubTitle size="3" mt="4">
50
+ A Bulma component library for React.
51
+ </SubTitle>
52
+ <Buttons isCentered mt="5">
53
+ <Button color="light" size="large">
54
+ Get started
55
+ </Button>
56
+ <Button color="light" size="large" isOutlined>
57
+ View docs
58
+ </Button>
59
+ </Buttons>
60
+ </Container>
61
+ </Hero.Body>
62
+ </Hero>
63
+
64
+ <Section size="large">
65
+ <Container>
66
+ <Title size="2" textAlign="centered" mb="6">
67
+ Why teams choose it
68
+ </Title>
69
+ <Columns>
70
+ {features.map(f => (
71
+ <Column key={f.name} display="flex">
72
+ <Card>
73
+ <Card.Content>
74
+ <IconText mb="3">
75
+ <Icon name={f.icon} textColor="primary" />
76
+ <Title size="4" mb="2">
77
+ {f.name}
78
+ </Title>
79
+ </IconText>
80
+ <Content textColor="grey">{f.blurb}</Content>
81
+ </Card.Content>
82
+ </Card>
83
+ </Column>
84
+ ))}
85
+ </Columns>
86
+ </Container>
87
+ </Section>
88
+ </ConfigProvider>
89
+ );
90
+ }
@@ -4,6 +4,10 @@ Four named, composable page patterns. For each: **when to pick it**, the **JSX s
4
4
  **responsive behavior**. Map the request to one archetype and build it — do not ask the user layout
5
5
  questions. Full runnable versions live in `examples/`.
6
6
 
7
+ Wrap any page once at the root in `<ConfigProvider iconLibrary="…">` so `<Icon>` needs no per-icon
8
+ `library` prop (see `examples/app-shell.tsx` and `examples/content-page.tsx`). Inside, style with
9
+ helper props (`mt`, `textAlign`, `textColor`), never inline `style`.
10
+
7
11
  ---
8
12
 
9
13
  ## 1. App shell with sidebar
@@ -21,6 +21,11 @@ import {
21
21
  Every component also accepts the shared Bulma helper props (`m`/`p` spacing, `textAlign`,
22
22
  `textColor`, `bgColor`, etc.).
23
23
 
24
+ > **Use helper props, never inline `style`, for spacing / alignment / color.** `mt="4"` (= 1rem)
25
+ > not `style={{ marginTop: '1rem' }}`; `textAlign="centered"` not `style={{ textAlign: 'center' }}`;
26
+ > `textColor="grey"` / `bgColor="light"` not `style={{ color }}`. Spacing scale is `0`–`6` | `auto`
27
+ > (`4` = 1rem). Reserve `style`/CSS vars only for values the design system doesn't tokenize.
28
+
24
29
  > **There is no `Tile` component.** Build grids and nested layouts with `Columns` / `Column`.
25
30
 
26
31
  ## Container
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bestax-theming
3
- description: Customize colors, branding, dark mode, and visual tokens of an app built with @allxsmith/bestax-bulma. Use when changing the primary/brand color, recoloring components, overriding Bulma --bulma-* CSS variables, setting fonts/radius/spacing tokens, or adding light/dark mode.
3
+ description: Customize colors, branding, dark mode, and visual tokens of an app built with @allxsmith/bestax-bulma. Use when changing the primary/brand color, recoloring components, overriding Bulma --bulma-* CSS variables, setting fonts/radius/spacing tokens, adding light/dark mode, or configuring the app-wide icon library / class prefix via ConfigProvider.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -52,6 +52,27 @@ import { Theme, Button } from '@allxsmith/bestax-bulma';
52
52
  <Button color="primary">Save</Button>;
53
53
  ```
54
54
 
55
+ ## App-wide config (icons & class prefix)
56
+
57
+ `ConfigProvider` sets app-wide options once at the root, separate from `Theme`. Wrap the app so
58
+ you don't repeat the same prop on every component:
59
+
60
+ ```tsx
61
+ import { ConfigProvider } from '@allxsmith/bestax-bulma';
62
+
63
+ // Set the icon library once — <Icon> no longer needs a `library` prop.
64
+ <ConfigProvider iconLibrary="fa">
65
+ <App />
66
+ </ConfigProvider>;
67
+ // now <Icon name="check" /> resolves as Font Awesome; no per-icon library="fa".
68
+ ```
69
+
70
+ - `iconLibrary` — `'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols'`. `Icon` reads it
71
+ (`library || iconLibrary || 'fa'`), so set it here instead of on each `<Icon>`.
72
+ - `classPrefix` — namespaces every Bulma class (e.g. `bulma-`) to avoid collisions with other CSS.
73
+
74
+ Nest `Theme` and `ConfigProvider` together at the root (order doesn't matter).
75
+
55
76
  ## References
56
77
 
57
78
  - `references/css-variables.md` — the `--bulma-*` variable map (colors, scheme/text/border, radius,
@@ -71,3 +92,4 @@ import { Theme, Button } from '@allxsmith/bestax-bulma';
71
92
  - [ ] Set non-color tokens (radius, fonts, sizes) through `bulmaVars` or `:root`.
72
93
  - [ ] Implement dark mode with `data-theme` on `<html>`; do not expect a shipped dark-mode component.
73
94
  - [ ] Pass `color`/`textColor`/`bgColor` (not custom CSS) to color individual components.
95
+ - [ ] Set the icon library once with `<ConfigProvider iconLibrary="…">` at the root, not `library` on every `<Icon>`.