提示词
我正在做一个动画加载器和图标库,这是我的第二个项目。这个周末我尝试为它构建一个落地页。但我做了一个实验,完全用 claude code:Sonnet 4.6 来构建它。
我对它第一次生成的结果相当满意。
这是我使用的确切提示词
> 我想让你为这个库创建一个落地页。
1. hero 区域 2. 带 CTA 按钮的功能展示,以及任何你认为重要的版块,从 components 文件夹里取用所有组件,例如 Heading.tsx、paragraph.tsx
使用 `max-w-5xl`,
颜色:以白色和黑色为基础(使用 tailwindcss 中的 neutral、stone 和 white)
我想在落地页中使用一种特定的图案,让它成为受 tailwindplus 主页启发的用心设计
下面是这个网格图案,请像专业设计工程师一样有目的、有品味地使用它
<div class="relative grid min-h-screen grid-cols-[1fr_2.5rem_auto_2.5rem_1fr] grid-rows-[1fr_1px_auto_1px_1fr] bg-white [--pattern-fg:var(--color-gray-950)]/5 dark:bg-gray-950 dark:[--pattern-fg:var(--color-white)]/10">
<div class="col-start-3 row-start-3 flex max-w-lg flex-col bg-gray-100 p-2 dark:bg-white/10">
<div class="rounded-xl bg-white p-10 text-sm/7 text-gray-700 dark:bg-gray-950 dark:text-gray-300">
<img src="/img/logo.svg" class="mb-11.5 h-6 dark:hidden" alt="Tailwind Play" />
<img src="/img/logo-dark.svg" class="mb-11.5 h-6 not-dark:hidden" alt="Tailwind Play" />
<hr class="my-6 w-full border-(--pattern-fg)" />
<p class="mb-3">Want to dig deeper into Tailwind?</p>
<p class="font-semibold">
<a href="" class="text-gray-950 underline decoration-sky-400 underline-offset-3 hover:decoration-2 dark:text-white">Read the docs →</a>
</p>
</div>
</div>
<div class="relative -right-px col-start-2 row-span-full row-start-1 border-x border-x-(--pattern-fg) bg-[image:repeating-linear-gradient(315deg,_var(--pattern-fg)_0,_var(--pattern-fg)_1px,_transparent_0,_transparent_50%)] bg-[size:10px_10px] bg-fixed"></div>
<div class="relative -left-px col-start-4 row-span-full row-start-1 border-x border-x-(--pattern-fg) bg-[image:repeating-linear-gradient(315deg,_var(--pattern-fg)_0,_var(--pattern-fg)_1px,_transparent_0,_transparent_50%)] bg-[size:10px_10px] bg-fixed"></div>
<div class="relative -bottom-px col-span-full col-start-1 row-start-2 h-px bg-(--pattern-fg)"></div>
<div class="relative -top-px col-span-full col-start-1 row-start-4 h-px bg-(--pattern-fg)"></div>
</div>
这是结果
@mannupaaji 有什么改进提示词的建议吗?
你希望在这里加入什么,才能获得更好的输出?原文提示词(English)
I am building an animated loader and icon library as my second project. This weekend I tried building a landing page for this. But I made an experiment to build it completely with claude code : Sonnet 4.6
I am quite happy what it has built at the very first shot.
Here is the exact prompt I have used
> I want you to create a landing page for this library.
1. hero section 2. features with CTA buttons and any
section if u think can be important take all the components for example Heading.tsx paragraph.tsx from components folders
Use `max-w-5xl`,
Colours : white and black based (use neutral, stone and white from tailwindcss
I want to use specifi pattern to use in the landing page to make it a thoughtfl design inspired by tailwindplus homepage
Here is the grid patter use it purposefully, with a good taste as a pro design engineer
<div class="relative grid min-h-screen grid-cols-[1fr_2.5rem_auto_2.5rem_1fr] grid-rows-[1fr_1px_auto_1px_1fr] bg-white [--pattern-fg:var(--color-gray-950)]/5 dark:bg-gray-950 dark:[--pattern-fg:var(--color-white)]/10">
<div class="col-start-3 row-start-3 flex max-w-lg flex-col bg-gray-100 p-2 dark:bg-white/10">
<div class="rounded-xl bg-white p-10 text-sm/7 text-gray-700 dark:bg-gray-950 dark:text-gray-300">
<img src="/img/logo.svg" class="mb-11.5 h-6 dark:hidden" alt="Tailwind Play" />
<img src="/img/logo-dark.svg" class="mb-11.5 h-6 not-dark:hidden" alt="Tailwind Play" />
<hr class="my-6 w-full border-(--pattern-fg)" />
<p class="mb-3">Want to dig deeper into Tailwind?</p>
<p class="font-semibold">
<a href="" class="text-gray-950 underline decoration-sky-400 underline-offset-3 hover:decoration-2 dark:text-white">Read the docs →</a>
</p>
</div>
</div>
<div class="relative -right-px col-start-2 row-span-full row-start-1 border-x border-x-(--pattern-fg) bg-[image:repeating-linear-gradient(315deg,_var(--pattern-fg)_0,_var(--pattern-fg)_1px,_transparent_0,_transparent_50%)] bg-[size:10px_10px] bg-fixed"></div>
<div class="relative -left-px col-start-4 row-span-full row-start-1 border-x border-x-(--pattern-fg) bg-[image:repeating-linear-gradient(315deg,_var(--pattern-fg)_0,_var(--pattern-fg)_1px,_transparent_0,_transparent_50%)] bg-[size:10px_10px] bg-fixed"></div>
<div class="relative -bottom-px col-span-full col-start-1 row-start-2 h-px bg-(--pattern-fg)"></div>
<div class="relative -top-px col-span-full col-start-1 row-start-4 h-px bg-(--pattern-fg)"></div>
</div>
Here is the result
@mannupaaji any advice how I can improve prompts?
What's you would like to add on here to have a better output?建议模型
Claude Code · Sonnet 4.6 / GPT-5.6 Sol
视频地址
https://media.goodcase.ai/media/video/claude-code-70e93cdbc884.mp4