Skip to content

Commit 9e70faf

Browse files
💄 style: update assets
1 parent 7b2022c commit 9e70faf

12 files changed

Lines changed: 2114 additions & 1656 deletions

File tree

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
name: building-landing-home
3+
description: >
4+
Compose a product or documentation home page from the @lobehub/ui/awesome landing components:
5+
LandingHero, AgentSkillCard, LogoMarquee, LandingSection, BentoGrid/BentoCard, CodeShowcase,
6+
FeatureGrid, InstallBanner and FluidGradient. Covers page structure, the lobedocs homePage
7+
hook, router links, theming the accent gradient, and a review checklist. Trigger on build a
8+
home page, landing page, docs home, marketing page, hero section, redesign home, lobedocs
9+
homePage, 首页, 落地页, 官网首页.
10+
---
11+
12+
# Building a landing home with @lobehub/ui/awesome
13+
14+
Every band of a landing page has a component. Your job is to choose the bands, write honest copy
15+
and render real product UI inside them, not to restyle containers.
16+
17+
## Components
18+
19+
All components import from `@lobehub/ui/awesome`. Read each one's page before using a prop you
20+
have not seen here: `https://ui.lobehub.com/skills/components/awesome/<kebab-name>.md`.
21+
22+
| Band | Component | Use it for |
23+
| ----------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------ |
24+
| Opening | `LandingHero` | Badge, title with gradient `accent`, description, up to two `actions`, optional `aside` column. |
25+
| Beside the hero text | `AgentSkillCard` | "I'm an Agent / I'm a Human" card: a prompt for coding agents and an install command for people. |
26+
| Under the hero | `LogoMarquee` | Integrations or supported providers. Icons from `@lobehub/icons`. |
27+
| Any middle band | `LandingSection` | Tag, title and description on the left, small `actions` on the right, content below. Wrap every middle band in it. |
28+
| Live component gallery | `BentoGrid` + `BentoCard` | Tiles that render real components; `colSpan`/`rowSpan` for emphasis; `href` to the docs page. |
29+
| Code next to its result | `CodeShowcase` | Two to four short snippets, each with a live `preview`. |
30+
| Reasons to choose | `FeatureGrid` | Three or six cards of icon, title and one-sentence description. |
31+
| Closing call to action | `InstallBanner` | Title, copyable install command, footnote with license and a docs link. |
32+
| Background texture | `FluidGradient` | Place it behind a positioned band when you want a texture. Needs a positioned parent. |
33+
34+
## Page structure
35+
36+
Default order. Drop a band rather than filling it with filler.
37+
38+
1. `LandingHero` with `aside={<AgentSkillCard />}` and `children={<LogoMarquee />}`.
39+
2. `LandingSection` + `BentoGrid`: the widest, most visual proof.
40+
3. `LandingSection` + `CodeShowcase`: how little code it takes.
41+
4. `LandingSection` + `FeatureGrid`: foundations such as theming, i18n, performance.
42+
5. `InstallBanner`.
43+
44+
```tsx
45+
import {
46+
AgentSkillCard,
47+
InstallBanner,
48+
LandingHero,
49+
LandingSection,
50+
LogoMarquee,
51+
} from '@lobehub/ui/awesome';
52+
import { ArrowRight } from 'lucide-react';
53+
54+
export default function Home() {
55+
return (
56+
<>
57+
<LandingHero
58+
accent="UI Kit"
59+
actions={[
60+
{
61+
href: '/docs',
62+
icon: ArrowRight,
63+
iconPlacement: 'end',
64+
label: 'Get Started',
65+
primary: true,
66+
},
67+
{ href: 'https://github.com/acme/kit', label: 'GitHub' },
68+
]}
69+
aside={
70+
<AgentSkillCard
71+
agent={{
72+
code: 'Read https://kit.acme.dev/skills.md and follow it to build UI with @acme/kit.',
73+
description: 'Send this prompt to your agent to pick the right components',
74+
}}
75+
human={{
76+
code: 'npx skills add acme/kit',
77+
description: 'Install the skills into your project',
78+
}}
79+
/>
80+
}
81+
description="One sentence on what it is and who it is for."
82+
title="Acme"
83+
>
84+
<LogoMarquee items={[/* { icon: OpenAI, label: 'OpenAI' } */]} />
85+
</LandingHero>
86+
87+
<LandingSection
88+
actions={[{ href: '/components', label: 'Browse components' }]}
89+
eyebrow="Components"
90+
id="home-gallery"
91+
title="Built for AI interfaces"
92+
>
93+
{/* BentoGrid of live tiles */}
94+
</LandingSection>
95+
96+
<InstallBanner
97+
command="pnpm add @acme/kit"
98+
footnote="Open source · MIT license"
99+
title="Start building"
100+
/>
101+
</>
102+
);
103+
}
104+
```
105+
106+
## Wiring
107+
108+
- **lobedocs sites**: set `homePage: './docs/home/home.tsx'` in `docs.config.ts`. The default export
109+
receives `{ description, getStartedPathname }`; use `getStartedPathname` for the primary action.
110+
- **Client-side routing**: `LandingHero`, `BentoCard` and `FeatureGrid` render plain anchors. Pass one
111+
shared `renderLink` so internal links use the router and absolute URLs open in a new tab:
112+
113+
```tsx
114+
import type { LandingLinkRender } from '@lobehub/ui/awesome';
115+
import { Link } from 'react-router';
116+
117+
export const renderLink: LandingLinkRender = ({ external, href, ...props }) =>
118+
external ? (
119+
<a href={href} rel="noreferrer" target="_blank" {...props} />
120+
) : (
121+
<Link to={href} {...props} />
122+
);
123+
```
124+
125+
- **Accent colour**: the gradient on the hero accent, eyebrows, outlined action and install glow
126+
reads `--lobe-landing-gradient`. Set it once on `:root` (and per theme) instead of overriding
127+
component styles. `FluidGradient` takes its three stops through `colors`.
128+
- **Search indexing**: wrap the title and description in `<span data-pagefind-meta="title">` /
129+
`"description"` when the site uses Pagefind.
130+
131+
## AgentSkillCard content
132+
133+
- The agent prompt must point at a URL that exists: the site's `skills.md` (lobedocs generates it)
134+
or `llms.txt`. Say what the agent should do with it, in one sentence.
135+
- The human command must be runnable as written. If the project has no skills package, drop
136+
`human` and the card shows the prompt alone.
137+
- `agents` defaults to `DEFAULT_SKILL_AGENTS` (Claude Code, Codex, Cursor, Gemini CLI, GitHub
138+
Copilot, Windsurf, Cline, OpenCode). Replace it with the `.Avatar` components from
139+
`@lobehub/icons` that the project actually supports, or `[]` to hide the row.
140+
- Use `footer` for secondary links such as `skills.md` and `llms.txt`.
141+
142+
## Copy and content rules
143+
144+
- Title: the product name, with the category or promise as `accent`. No more than four words.
145+
- Description: one sentence, under 20 words, concrete ("React components for AIGC web apps"),
146+
never "powerful", "seamless" or "next-generation".
147+
- At most two hero actions: one `primary`, one secondary.
148+
- Bento tiles render real components with realistic data. A tile that cannot show something live
149+
does not belong in the grid. Give the most expressive component `colSpan={2} rowSpan={2}`.
150+
- `CodeShowcase` snippets fit in about ten lines and compile as written.
151+
- `FeatureGrid` uses three or six items; each description is one sentence.
152+
- `LandingSection` `id` values must be unique; they label the headings.
153+
- `eyebrow` is a one- or two-word tag ("Components", "Foundations"); give each band its own
154+
`eyebrowColor` preset (`blue`, `green`, `orange`…). Give a section at most one `actions` entry.
155+
- Only the hero's Get Started action is `primary`. Every other action renders as
156+
`BottomGradientButton`; pass `onNavigate={useNavigate()}` so internal ones route client-side.
157+
158+
## Review checklist
159+
160+
1. Every link resolves: primary action, bento `href`s, prompt URL, footer links.
161+
2. Light and dark mode both read well; the accent gradient is not the only thing carrying meaning.
162+
3. At 375px wide the hero stacks, actions fill the width, and the bento grid is one column.
163+
4. Nothing animates under `prefers-reduced-motion` (the marquee stops, the texture freezes).
164+
5. Copy passes the rules above; no placeholder text or lorem ipsum remains.
25 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)