bestax-mcp 0.0.0
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/README.md +90 -0
- package/data/catalog.json +1869 -0
- package/data/components/Autocomplete.json +604 -0
- package/data/components/Avatar.json +220 -0
- package/data/components/Avatars.json +294 -0
- package/data/components/Badge.json +261 -0
- package/data/components/Block.json +105 -0
- package/data/components/Box.json +157 -0
- package/data/components/Breadcrumb.json +155 -0
- package/data/components/Button.json +599 -0
- package/data/components/Buttons.json +533 -0
- package/data/components/Card.json +506 -0
- package/data/components/Carousel.json +512 -0
- package/data/components/Cell.json +154 -0
- package/data/components/Checkbox.json +176 -0
- package/data/components/Checkboxes.json +240 -0
- package/data/components/Code.json +128 -0
- package/data/components/Collapse.json +218 -0
- package/data/components/Column.json +284 -0
- package/data/components/Columns.json +542 -0
- package/data/components/ConfigProvider.json +16 -0
- package/data/components/Container.json +149 -0
- package/data/components/Content.json +228 -0
- package/data/components/Control.json +484 -0
- package/data/components/DateInput.json +872 -0
- package/data/components/DateTimeInput.json +952 -0
- package/data/components/Delete.json +153 -0
- package/data/components/Dialog.json +285 -0
- package/data/components/Divider.json +68 -0
- package/data/components/Dropdown.json +353 -0
- package/data/components/Emphasis.json +99 -0
- package/data/components/Field.json +539 -0
- package/data/components/Figure.json +143 -0
- package/data/components/File.json +403 -0
- package/data/components/Footer.json +109 -0
- package/data/components/Grid.json +357 -0
- package/data/components/Hero.json +340 -0
- package/data/components/Icon.json +232 -0
- package/data/components/IconText.json +307 -0
- package/data/components/Image.json +166 -0
- package/data/components/Input.json +583 -0
- package/data/components/Level.json +332 -0
- package/data/components/Link.json +154 -0
- package/data/components/LinkButton.json +247 -0
- package/data/components/ListItem.json +101 -0
- package/data/components/Loading.json +323 -0
- package/data/components/Media.json +345 -0
- package/data/components/Menu.json +317 -0
- package/data/components/Message.json +303 -0
- package/data/components/Modal.json +444 -0
- package/data/components/Navbar.json +996 -0
- package/data/components/Notification.json +165 -0
- package/data/components/Numberinput.json +364 -0
- package/data/components/OrderedList.json +189 -0
- package/data/components/Pagination.json +619 -0
- package/data/components/Panel.json +582 -0
- package/data/components/Paragraph.json +107 -0
- package/data/components/Pre.json +114 -0
- package/data/components/Progress.json +137 -0
- package/data/components/Radio.json +164 -0
- package/data/components/Radios.json +240 -0
- package/data/components/Rate.json +466 -0
- package/data/components/Reveal.json +177 -0
- package/data/components/Section.json +123 -0
- package/data/components/Select.json +526 -0
- package/data/components/Sidebar.json +488 -0
- package/data/components/Skeleton.json +162 -0
- package/data/components/Slider.json +534 -0
- package/data/components/Span.json +100 -0
- package/data/components/Steps.json +452 -0
- package/data/components/Strong.json +105 -0
- package/data/components/SubTitle.json +233 -0
- package/data/components/Switch.json +291 -0
- package/data/components/Table.json +490 -0
- package/data/components/Tabs.json +592 -0
- package/data/components/Tag.json +197 -0
- package/data/components/Taginput.json +587 -0
- package/data/components/Tags.json +181 -0
- package/data/components/TextArea.json +483 -0
- package/data/components/Theme.json +65 -0
- package/data/components/TimeInput.json +906 -0
- package/data/components/Title.json +240 -0
- package/data/components/Toast.json +308 -0
- package/data/components/Tooltip.json +212 -0
- package/data/components/UnorderedList.json +149 -0
- package/data/components/Valid value constants.json +16 -0
- package/data/components/classNames.json +65 -0
- package/data/components/useBulmaClasses.json +169 -0
- package/data/components/usePrefixedClassNames.json +25 -0
- package/data/skills/bestax-custom-component/SKILL.md +196 -0
- package/data/skills/bestax-custom-component/examples/stat-card.tsx +105 -0
- package/data/skills/bestax-custom-component/references/api.md +90 -0
- package/data/skills/bestax-custom-component/references/component-catalog.md +149 -0
- package/data/skills/bestax-custom-component/references/library-contributor.md +395 -0
- package/data/skills/bestax-custom-component/references/patterns.md +136 -0
- package/data/skills/bestax-form/SKILL.md +254 -0
- package/data/skills/bestax-form/references/api.md +103 -0
- package/data/skills/bestax-form/references/patterns.md +210 -0
- package/data/skills/bestax-icons/SKILL.md +80 -0
- package/data/skills/bestax-icons/examples/icon-usage.tsx +80 -0
- package/data/skills/bestax-icons/references/icon-libraries.md +131 -0
- package/data/skills/bestax-layout-scaffold/SKILL.md +196 -0
- package/data/skills/bestax-layout-scaffold/examples/app-shell.tsx +86 -0
- package/data/skills/bestax-layout-scaffold/examples/card-grid.tsx +106 -0
- package/data/skills/bestax-layout-scaffold/examples/centered.tsx +56 -0
- package/data/skills/bestax-layout-scaffold/examples/content-page.tsx +90 -0
- package/data/skills/bestax-layout-scaffold/examples/landing.tsx +122 -0
- package/data/skills/bestax-layout-scaffold/references/archetypes.md +246 -0
- package/data/skills/bestax-layout-scaffold/references/layout-components.md +269 -0
- package/data/skills/bestax-migrate/SKILL.md +78 -0
- package/data/skills/bestax-migrate/references/component-map.md +91 -0
- package/data/skills/bestax-migrate/references/css-migration.md +100 -0
- package/data/skills/bestax-migrate/references/prop-map.md +48 -0
- package/data/skills/bestax-migrate/references/unmappables.md +124 -0
- package/data/skills/bestax-optimize/SKILL.md +131 -0
- package/data/skills/bestax-optimize/references/modular-build.md +173 -0
- package/data/skills/bestax-theming/SKILL.md +117 -0
- package/data/skills/bestax-theming/examples/dark-mode.tsx +38 -0
- package/data/skills/bestax-theming/examples/theme-config.tsx +60 -0
- package/data/skills/bestax-theming/references/css-variables.md +466 -0
- package/data/skills/bestax-theming/references/themeable-components.md +119 -0
- package/data/skills.json +148 -0
- package/dist/data.d.ts +131 -0
- package/dist/data.d.ts.map +1 -0
- package/dist/data.js +111 -0
- package/dist/format.d.ts +37 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +178 -0
- package/dist/helper-props.d.ts +57 -0
- package/dist/helper-props.d.ts.map +1 -0
- package/dist/helper-props.js +249 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/search.d.ts +32 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +194 -0
- package/dist/server.d.ts +28 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +616 -0
- package/dist/version.d.ts +29 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +147 -0
- package/package.json +70 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Marketing / landing page — fixed top Navbar + Hero + stacked Sections + Footer.
|
|
2
|
+
// Each Section stacks vertically; the feature Columns collapse to one per row on
|
|
3
|
+
// mobile (Bulma columns stack below the tablet breakpoint).
|
|
4
|
+
//
|
|
5
|
+
// The Navbar's burger/menu is CONTROLLED: `active` on Navbar.Menu shows/hides
|
|
6
|
+
// the mobile menu, while `active` + `onClick` on Navbar.Burger make the burger
|
|
7
|
+
// toggle it and animate. Wire the same state to both — left unwired, clicking
|
|
8
|
+
// the burger does nothing; desktop looks fine and nothing errors, so the
|
|
9
|
+
// failure is silent. A fixed-top navbar
|
|
10
|
+
// also needs the `has-navbar-fixed-top` class on <html> so the page is padded
|
|
11
|
+
// below it (never an inline padding offset) — Bulma requires this and the
|
|
12
|
+
// library does NOT add it for you.
|
|
13
|
+
import React, { useEffect, useState } from 'react';
|
|
14
|
+
import {
|
|
15
|
+
Navbar,
|
|
16
|
+
Hero,
|
|
17
|
+
Section,
|
|
18
|
+
Container,
|
|
19
|
+
Footer,
|
|
20
|
+
Columns,
|
|
21
|
+
Column,
|
|
22
|
+
Box,
|
|
23
|
+
Title,
|
|
24
|
+
SubTitle,
|
|
25
|
+
Content,
|
|
26
|
+
Button,
|
|
27
|
+
Buttons,
|
|
28
|
+
} from '@allxsmith/bestax-bulma';
|
|
29
|
+
|
|
30
|
+
const FEATURES = [
|
|
31
|
+
{ title: 'Fast', body: 'Ship pages in minutes, not days.' },
|
|
32
|
+
{ title: 'Responsive', body: 'Looks right on every screen by default.' },
|
|
33
|
+
{ title: 'Composable', body: 'Build from small, predictable pieces.' },
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export default function LandingPage() {
|
|
37
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
document.documentElement.classList.add('has-navbar-fixed-top');
|
|
41
|
+
return () => {
|
|
42
|
+
document.documentElement.classList.remove('has-navbar-fixed-top');
|
|
43
|
+
};
|
|
44
|
+
}, []);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<>
|
|
48
|
+
<Navbar fixed="top">
|
|
49
|
+
<Navbar.Brand>
|
|
50
|
+
<Navbar.Item href="#">Acme</Navbar.Item>
|
|
51
|
+
<Navbar.Burger
|
|
52
|
+
active={menuOpen}
|
|
53
|
+
onClick={() => setMenuOpen(open => !open)}
|
|
54
|
+
aria-label="menu"
|
|
55
|
+
aria-expanded={menuOpen}
|
|
56
|
+
/>
|
|
57
|
+
</Navbar.Brand>
|
|
58
|
+
<Navbar.Menu active={menuOpen}>
|
|
59
|
+
<Navbar.Start>
|
|
60
|
+
<Navbar.Item href="#">Features</Navbar.Item>
|
|
61
|
+
<Navbar.Item href="#">Pricing</Navbar.Item>
|
|
62
|
+
</Navbar.Start>
|
|
63
|
+
<Navbar.End>
|
|
64
|
+
<Navbar.Item href="#">Sign in</Navbar.Item>
|
|
65
|
+
</Navbar.End>
|
|
66
|
+
</Navbar.Menu>
|
|
67
|
+
</Navbar>
|
|
68
|
+
|
|
69
|
+
<Hero color="primary" size="medium">
|
|
70
|
+
<Hero.Body>
|
|
71
|
+
<Container textAlign="centered">
|
|
72
|
+
<Title size="1">Ship faster with Acme</Title>
|
|
73
|
+
<SubTitle size="3">
|
|
74
|
+
The all-in-one platform for modern teams.
|
|
75
|
+
</SubTitle>
|
|
76
|
+
{/* Both CTAs are FILLED: on a fixed-color hero a thin outlined
|
|
77
|
+
button (light outline + light label) reads washed out, and
|
|
78
|
+
worse under OS dark mode. isInverted (no isOutlined) gives a
|
|
79
|
+
solid white button with primary text — high contrast in both
|
|
80
|
+
schemes. */}
|
|
81
|
+
<Buttons isCentered mt="5">
|
|
82
|
+
<Button color="light" size="large">
|
|
83
|
+
Get started
|
|
84
|
+
</Button>
|
|
85
|
+
<Button color="primary" isInverted size="large">
|
|
86
|
+
Live demo
|
|
87
|
+
</Button>
|
|
88
|
+
</Buttons>
|
|
89
|
+
</Container>
|
|
90
|
+
</Hero.Body>
|
|
91
|
+
</Hero>
|
|
92
|
+
|
|
93
|
+
<Section size="large">
|
|
94
|
+
<Container>
|
|
95
|
+
<Title size="3" textAlign="centered" mb="6">
|
|
96
|
+
Why Acme
|
|
97
|
+
</Title>
|
|
98
|
+
<Columns>
|
|
99
|
+
{FEATURES.map(feature => (
|
|
100
|
+
<Column key={feature.title}>
|
|
101
|
+
<Box>
|
|
102
|
+
<Title size="5">{feature.title}</Title>
|
|
103
|
+
<Content>{feature.body}</Content>
|
|
104
|
+
</Box>
|
|
105
|
+
</Column>
|
|
106
|
+
))}
|
|
107
|
+
</Columns>
|
|
108
|
+
</Container>
|
|
109
|
+
</Section>
|
|
110
|
+
|
|
111
|
+
<Footer>
|
|
112
|
+
<Container>
|
|
113
|
+
<Content textAlign="centered">
|
|
114
|
+
<p>
|
|
115
|
+
<strong>Acme</strong> — built with bestax-bulma.
|
|
116
|
+
</p>
|
|
117
|
+
</Content>
|
|
118
|
+
</Container>
|
|
119
|
+
</Footer>
|
|
120
|
+
</>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# Layout archetypes
|
|
2
|
+
|
|
3
|
+
Four named, composable page patterns. For each: **when to pick it**, the **JSX skeleton**, and its
|
|
4
|
+
**responsive behavior**. Map the request to one archetype and build it — do not ask the user layout
|
|
5
|
+
questions. Full runnable versions live in `examples/`.
|
|
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
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. App shell with sidebar
|
|
14
|
+
|
|
15
|
+
**Pick when:** the request is an internal/authenticated tool — dashboard, admin, console, back
|
|
16
|
+
office, or anything that mentions a persistent sidebar/navigation. The default for "build me an
|
|
17
|
+
app".
|
|
18
|
+
|
|
19
|
+
**Skeleton:**
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
const [open, setOpen] = useState(false); // controls the burger + mobile menu
|
|
23
|
+
|
|
24
|
+
<>
|
|
25
|
+
{/* fixed="top" requires <html class="has-navbar-fixed-top"> — set it in index.html */}
|
|
26
|
+
<Navbar fixed="top" color="dark">
|
|
27
|
+
<Navbar.Brand>
|
|
28
|
+
<Navbar.Item href="#">Brand</Navbar.Item>
|
|
29
|
+
<Navbar.Burger
|
|
30
|
+
active={open}
|
|
31
|
+
onClick={() => setOpen(o => !o)}
|
|
32
|
+
aria-label="menu"
|
|
33
|
+
/>
|
|
34
|
+
</Navbar.Brand>
|
|
35
|
+
<Navbar.Menu active={open}>
|
|
36
|
+
<Navbar.End>
|
|
37
|
+
<Navbar.Item href="#">Account</Navbar.Item>
|
|
38
|
+
</Navbar.End>
|
|
39
|
+
</Navbar.Menu>
|
|
40
|
+
</Navbar>
|
|
41
|
+
|
|
42
|
+
<Container fluid>
|
|
43
|
+
<Columns>
|
|
44
|
+
<Column size={3} sizeWidescreen={2}>
|
|
45
|
+
<Menu>
|
|
46
|
+
<Menu.Label>General</Menu.Label>
|
|
47
|
+
<Menu.List>
|
|
48
|
+
<Menu.Item active href="#">
|
|
49
|
+
Dashboard
|
|
50
|
+
</Menu.Item>
|
|
51
|
+
<Menu.Item href="#">Customers</Menu.Item>
|
|
52
|
+
</Menu.List>
|
|
53
|
+
</Menu>
|
|
54
|
+
</Column>
|
|
55
|
+
<Column>
|
|
56
|
+
<Section>{/* main content */}</Section>
|
|
57
|
+
</Column>
|
|
58
|
+
</Columns>
|
|
59
|
+
</Container>
|
|
60
|
+
</>;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Required:** add `has-navbar-fixed-top` to `<html>` — statically in `index.html`; an effect
|
|
64
|
+
(`examples/app-shell.tsx`) only for a conditionally-mounted navbar — so content is not hidden
|
|
65
|
+
behind the fixed navbar.
|
|
66
|
+
|
|
67
|
+
**Responsive:** the navbar collapses to a burger on mobile (`Navbar.Burger` + `Navbar.Menu active`).
|
|
68
|
+
The sidebar and content columns sit side by side on tablet and up, and stack (menu above content)
|
|
69
|
+
on mobile.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 2. Marketing / landing
|
|
74
|
+
|
|
75
|
+
**Pick when:** the request is a public-facing page — landing, homepage, marketing, product or
|
|
76
|
+
pricing page. The default for "build me a site/page".
|
|
77
|
+
|
|
78
|
+
**Skeleton:**
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
const [open, setOpen] = useState(false); // controls the burger + mobile menu
|
|
82
|
+
|
|
83
|
+
<>
|
|
84
|
+
<Navbar fixed="top">
|
|
85
|
+
<Navbar.Brand>
|
|
86
|
+
<Navbar.Item href="#">Brand</Navbar.Item>
|
|
87
|
+
<Navbar.Burger
|
|
88
|
+
active={open}
|
|
89
|
+
onClick={() => setOpen(o => !o)}
|
|
90
|
+
aria-label="menu"
|
|
91
|
+
/>
|
|
92
|
+
</Navbar.Brand>
|
|
93
|
+
<Navbar.Menu active={open}>
|
|
94
|
+
<Navbar.Start>
|
|
95
|
+
<Navbar.Item href="#">Features</Navbar.Item>
|
|
96
|
+
<Navbar.Item href="#">Pricing</Navbar.Item>
|
|
97
|
+
</Navbar.Start>
|
|
98
|
+
<Navbar.End>
|
|
99
|
+
<Navbar.Item href="#">Sign in</Navbar.Item>
|
|
100
|
+
</Navbar.End>
|
|
101
|
+
</Navbar.Menu>
|
|
102
|
+
</Navbar>
|
|
103
|
+
|
|
104
|
+
<Hero color="primary" size="medium">
|
|
105
|
+
<Hero.Body>
|
|
106
|
+
<Container textAlign="centered">
|
|
107
|
+
<Title size="1">Headline</Title>
|
|
108
|
+
<SubTitle size="3">Supporting line.</SubTitle>
|
|
109
|
+
<Buttons isCentered>
|
|
110
|
+
<Button color="light" size="large">
|
|
111
|
+
Primary CTA
|
|
112
|
+
</Button>
|
|
113
|
+
</Buttons>
|
|
114
|
+
</Container>
|
|
115
|
+
</Hero.Body>
|
|
116
|
+
</Hero>
|
|
117
|
+
|
|
118
|
+
<Section size="large">
|
|
119
|
+
<Container>
|
|
120
|
+
<Columns>
|
|
121
|
+
<Column>
|
|
122
|
+
<Box>{/* feature */}</Box>
|
|
123
|
+
</Column>
|
|
124
|
+
<Column>
|
|
125
|
+
<Box>{/* feature */}</Box>
|
|
126
|
+
</Column>
|
|
127
|
+
<Column>
|
|
128
|
+
<Box>{/* feature */}</Box>
|
|
129
|
+
</Column>
|
|
130
|
+
</Columns>
|
|
131
|
+
</Container>
|
|
132
|
+
</Section>
|
|
133
|
+
|
|
134
|
+
<Footer>
|
|
135
|
+
<Container>
|
|
136
|
+
<Content textAlign="centered">{/* footer */}</Content>
|
|
137
|
+
</Container>
|
|
138
|
+
</Footer>
|
|
139
|
+
</>;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Required:** `Navbar.Burger`/`Navbar.Menu` are **controlled** — wire the same `active` state to
|
|
143
|
+
both: `active` on `Navbar.Menu` shows/hides the mobile menu, and `active` + `onClick` on
|
|
144
|
+
`Navbar.Burger` make the burger toggle it and animate (a bare `<Navbar.Burger />` does nothing
|
|
145
|
+
when clicked, with no error). And add
|
|
146
|
+
`has-navbar-fixed-top` to `<html>` (see `examples/landing.tsx`) so content is not hidden behind
|
|
147
|
+
the fixed navbar — never an inline padding offset.
|
|
148
|
+
|
|
149
|
+
**Responsive:** the navbar collapses to a burger on mobile (`Navbar.Burger` + `Navbar.Menu active`).
|
|
150
|
+
`Section`s already stack vertically. The feature `Columns` collapse to one feature
|
|
151
|
+
per row on mobile. Use `Hero size="large"` / `"fullheight"` for a taller hero.
|
|
152
|
+
|
|
153
|
+
**Site chrome:** a full site adds the App-shell `Navbar` (archetype 1, minus the sidebar) above
|
|
154
|
+
the `Hero`; if it's `fixed="top"`, the same `<html class="has-navbar-fixed-top">` requirement
|
|
155
|
+
applies here too.
|
|
156
|
+
|
|
157
|
+
**Alternating section bands:** tint every other `Section` with a scheme step —
|
|
158
|
+
`.section-alt { background: var(--bulma-scheme-main-bis); }` (next step `-ter`) — not
|
|
159
|
+
`bgColor="light"`/`"white"`: those are fixed colors that stay light when dark mode flips the text.
|
|
160
|
+
|
|
161
|
+
**Hero CTAs:** on a colored hero use **filled** buttons only — `color="light"` for the primary
|
|
162
|
+
CTA and `color="primary" isInverted` (solid white, primary text) for a secondary. A thin
|
|
163
|
+
`isOutlined` button on a fixed-color surface is low-contrast and degrades further under OS dark
|
|
164
|
+
mode. Single-mode page designs should also pin the scheme at the root
|
|
165
|
+
(`<Theme isRoot colorMode="light">`) — see the `bestax-theming` skill's contrast rules.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 3. Centered single-column
|
|
170
|
+
|
|
171
|
+
**Pick when:** the request is one focused task — login, sign up, auth, settings, checkout, or a
|
|
172
|
+
single standalone form/panel.
|
|
173
|
+
|
|
174
|
+
**Skeleton:**
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
<Section>
|
|
178
|
+
<Container>
|
|
179
|
+
<Columns isCentered>
|
|
180
|
+
<Column size="half" sizeWidescreen="one-third">
|
|
181
|
+
<Box>{/* form / panel */}</Box>
|
|
182
|
+
</Column>
|
|
183
|
+
</Columns>
|
|
184
|
+
</Container>
|
|
185
|
+
</Section>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Responsive:** the centered column is narrow on desktop and becomes full width on mobile. Tighten
|
|
189
|
+
or widen via the `size*` breakpoint props (`one-third` desktop, `half` tablet, full mobile).
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 4. Card grid / catalog
|
|
194
|
+
|
|
195
|
+
**Pick when:** the request is a collection of similar items — catalog, gallery, products, listing,
|
|
196
|
+
search results, "a grid of cards".
|
|
197
|
+
|
|
198
|
+
**Skeleton:**
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
<Section>
|
|
202
|
+
<Container>
|
|
203
|
+
<Columns isMultiline>
|
|
204
|
+
{items.map(item => (
|
|
205
|
+
<Column
|
|
206
|
+
key={item.id}
|
|
207
|
+
sizeMobile="full"
|
|
208
|
+
sizeTablet="half"
|
|
209
|
+
sizeDesktop="one-third"
|
|
210
|
+
display="flex"
|
|
211
|
+
flexDirection="column"
|
|
212
|
+
>
|
|
213
|
+
<Card
|
|
214
|
+
flexGrow="1"
|
|
215
|
+
image={item.image}
|
|
216
|
+
header={item.name}
|
|
217
|
+
footer={item.price} // Card wraps footer items in .card-footer-item itself
|
|
218
|
+
>
|
|
219
|
+
{item.blurb}
|
|
220
|
+
</Card>
|
|
221
|
+
</Column>
|
|
222
|
+
))}
|
|
223
|
+
</Columns>
|
|
224
|
+
</Container>
|
|
225
|
+
</Section>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Responsive:** `isMultiline` wraps cards onto new rows; the `size*` props set the per-row count —
|
|
229
|
+
1 on mobile, 2 on tablet, 3 on desktop here. Change the fractions to change the column count.
|
|
230
|
+
|
|
231
|
+
**Equal heights:** the `display="flex" flexDirection="column"` on each `Column` plus
|
|
232
|
+
`flexGrow="1"` on the `Card` stretches every card to its row's height — without it, cards end
|
|
233
|
+
at their content and rows look ragged (`height: 100%` on the card doesn't help — it resolves
|
|
234
|
+
against the column's auto height). Alternatively
|
|
235
|
+
build the whole grid with `Grid`/`Cell` (`<Grid isFixed fixedColsMobile={1} fixedColsTablet={2}
|
|
236
|
+
fixedColsDesktop={3} gap={4}>`) — CSS Grid keeps cells equal-height for free; see the
|
|
237
|
+
`Grid / Cell` section in `layout-components.md`.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Combining archetypes
|
|
242
|
+
|
|
243
|
+
Archetypes nest. An "admin dashboard with a product list" is **App shell** whose main `Column`
|
|
244
|
+
holds a **Card grid**. A "settings page inside the app" is **App shell** whose main column holds a
|
|
245
|
+
**Centered** panel. Pick the outer archetype from the dominant intent, then place another inside
|
|
246
|
+
its content area.
|