Basic Item
A simple item with title and description.
A simple item with title and description.
npm install @a3s-lab/ui@0.3.0<button type="button" class="item" data-variant="outline">
<span data-item-content><strong>run_01JY7K</strong><small>精确 Agent 发布</small></span>
<span data-item-actions><span class="status-badge" data-state="active">运行中</span></span>
</button>import "@a3s-lab/ui/a3s.css";
import "@a3s-lab/ui/all";导入 Tailwind 和一个完整的 A3S UI 样式包。
@import "tailwindcss";
@import "@a3s-lab/ui/a3s.css";或者只导入基本CSS、其组成的组件CSS文件和一个样式包。
@import "tailwindcss";
@import "@a3s-lab/ui/base.css";
@import "@a3s-lab/ui/components/item.css";
@import "@a3s-lab/ui/components/status-badge.css";
@import "@a3s-lab/ui/components/button.css";
@import "@a3s-lab/ui/styles/a3s.css";当操作呈现为按钮时,项目组成按钮样式。
使用CDN或批量程序导入?请参见安装页。
Add class="item" to a semantic element such as <article> or <a>. Use class="item-group" when listing multiple items.
<article class="item" data-variant="outline">
<section>
<h3>Basic Item</h3>
<p>A simple item with title and description.</p>
</section>
<aside>
<button class="btn" data-variant="outline" data-size="sm">Action</button>
</aside>
</article>当整个列表项是原生按钮时,使用行内容标记;分节元素不能作为按钮的合法子元素。
<button type="button" class="item" data-variant="outline">
<span data-item-content><strong>run_01JY7K</strong><small>精确 Agent 发布</small></span>
<span data-item-actions><span class="status-badge" data-state="active">运行中</span></span>
</button><article class="item">、<a class="item"> 或 <button class="item">The item root. Use data-variant="outline|muted" and data-size="sm|xs" when needed.
<figure> Optional<section>Primary content. Headings and paragraphs are styled automatically.
<h2>, <h3>, or <h4><p> Optional<aside> Optional[data-item-content], [data-item-actions] 按钮列表项<header>, <footer> Optional<div class="item-group" role="list"> Optionalrole="listitem" on child items when they are not native list items.使用 field 进行表单控制和验证。使用 item 显示内容、操作和导航行。
Transparent background with no border.
Outlined style with a visible border.
Muted background for secondary content.
<div class="flex w-full flex-col gap-6">
<article class="item">
<figure><svg class="lucide lucide-inbox" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /></svg></figure>
<section>
<h3>Default Variant</h3>
<p>Transparent background with no border.</p>
</section>
</article>
<article class="item" data-variant="outline">
<figure><svg class="lucide lucide-inbox" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /></svg></figure>
<section>
<h3>Outline Variant</h3>
<p>Outlined style with a visible border.</p>
</section>
</article>
<article class="item" data-variant="muted">
<figure><svg class="lucide lucide-inbox" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /></svg></figure>
<section>
<h3>Muted Variant</h3>
<p>Muted background for secondary content.</p>
</section>
</article>
</div>The standard size for most use cases.
A compact size for dense layouts.
The most compact size available.
<div class="flex w-full flex-col gap-6">
<article class="item" data-variant="outline">
<figure><svg class="lucide lucide-inbox" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /></svg></figure>
<section>
<h3>Default Size</h3>
<p>The standard size for most use cases.</p>
</section>
</article>
<article class="item" data-variant="outline" data-size="sm">
<figure><svg class="lucide lucide-inbox" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /></svg></figure>
<section>
<h3>Small Size</h3>
<p>A compact size for dense layouts.</p>
</section>
</article>
<article class="item" data-variant="outline" data-size="xs">
<figure><svg class="lucide lucide-inbox" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /></svg></figure>
<section>
<h3>Extra Small Size</h3>
<p>The most compact size available.</p>
</section>
</article>
</div>New login detected from unknown device.
<div class="flex w-full flex-col gap-6">
<article class="item" data-variant="outline">
<figure><svg class="lucide lucide-shield-alert" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M12 8v4"/><path d="M12 16h.01"/></svg></figure>
<section>
<h3>Security Alert</h3>
<p>New login detected from unknown device.</p>
</section>
<aside><button class="btn" data-variant="outline" data-size="sm">Review</button></aside>
</article>
</div>
Last seen 5 months ago



Invite your team to collaborate on this project.
<div class="flex w-full flex-col gap-6">
<article class="item" data-variant="outline">
<figure>
<span class="avatar" data-size="lg"><A3SAssetImage path="/assets/images/avatar-2.png" alt="Evil Rabbit" /></span>
</figure>
<section>
<h3>Evil Rabbit</h3>
<p>Last seen 5 months ago</p>
</section>
<aside>
<button class="btn rounded-full" data-variant="outline" data-size="icon-sm" aria-label="Invite Evil Rabbit"><svg class="lucide lucide-plus" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg></button>
</aside>
</article>
<article class="item" data-variant="outline">
<figure>
<span class="avatar-group">
<span class="avatar hidden sm:flex"><A3SAssetImage class="grayscale" path="/assets/images/avatar-1.png" alt="@shadcn" /></span>
<span class="avatar hidden sm:flex"><A3SAssetImage class="grayscale" path="/assets/images/avatar-3.png" alt="@maxleiter" /></span>
<span class="avatar"><A3SAssetImage class="grayscale" path="/assets/images/avatar-2.png" alt="@evilrabbit" /></span>
</span>
</figure>
<section>
<h3>No Team Members</h3>
<p>Invite your team to collaborate on this project.</p>
</section>
<aside><button class="btn" data-variant="outline" data-size="sm">Invite</button></aside>
</article>
</div><div class="item-group gap-4" role="list">
<a href="#" class="item" data-variant="outline" role="listitem">
<figure><A3SAssetImage class="grayscale" path="/assets/images/avatar-1.png" alt="Midnight City Lights" /></figure>
<section><h3>Midnight City Lights - <span class="text-muted-foreground">Electric Nights</span></h3><p>Neon Dreams</p></section>
<section><p>3:45</p></section>
</a>
<a href="#" class="item" data-variant="outline" role="listitem">
<figure><A3SAssetImage class="grayscale" path="/assets/images/avatar-3.png" alt="Coffee Shop Conversations" /></figure>
<section><h3>Coffee Shop Conversations - <span class="text-muted-foreground">Urban Stories</span></h3><p>The Morning Brew</p></section>
<section><p>4:05</p></section>
</a>
<a href="#" class="item" data-variant="outline" role="listitem">
<figure><A3SAssetImage class="grayscale" path="/assets/images/avatar-2.png" alt="Digital Rain" /></figure>
<section><h3>Digital Rain - <span class="text-muted-foreground">Binary Beats</span></h3><p>Cyber Symphony</p></section>
<section><p>3:30</p></section>
</a>
</div><div class="flex w-full flex-col gap-6">
<div class="item-group" role="list">
<article class="item" role="listitem">
<figure><span class="avatar"><A3SAssetImage class="grayscale" path="/assets/images/avatar-1.png" alt="@shadcn" /></span></figure>
<section><h3>shadcn</h3><p>shadcn@vercel.com</p></section>
<aside>
<button class="btn rounded-full" data-variant="ghost" data-size="icon" aria-label="Add shadcn"><svg class="lucide lucide-plus" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg></button>
</aside>
</article>
<article class="item" role="listitem">
<figure><span class="avatar"><A3SAssetImage class="grayscale" path="/assets/images/avatar-3.png" alt="@maxleiter" /></span></figure>
<section><h3>maxleiter</h3><p>maxleiter@vercel.com</p></section>
<aside>
<button class="btn rounded-full" data-variant="ghost" data-size="icon" aria-label="Add maxleiter"><svg class="lucide lucide-plus" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg></button>
</aside>
</article>
<article class="item" role="listitem">
<figure><span class="avatar"><A3SAssetImage class="grayscale" path="/assets/images/avatar-2.png" alt="@evilrabbit" /></span></figure>
<section><h3>evilrabbit</h3><p>evilrabbit@vercel.com</p></section>
<aside>
<button class="btn rounded-full" data-variant="ghost" data-size="icon" aria-label="Add evilrabbit"><svg class="lucide lucide-plus" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg></button>
</aside>
</article>
</div>
</div>Everyday tasks and UI generation.
Advanced thinking or reasoning.
Open Source model for everyone.
<div class="item-group grid grid-cols-1 gap-4 sm:grid-cols-3" role="list">
<article class="item" data-variant="outline" role="listitem">
<header><A3SAssetImage class="aspect-square w-full rounded-sm object-cover grayscale" path="/assets/images/avatar-1.png" alt="v0-1.5-sm" /></header>
<section><h3>v0-1.5-sm</h3><p>Everyday tasks and UI generation.</p></section>
</article>
<article class="item" data-variant="outline" role="listitem">
<header><A3SAssetImage class="aspect-square w-full rounded-sm object-cover grayscale" path="/assets/images/avatar-3.png" alt="v0-1.5-lg" /></header>
<section><h3>v0-1.5-lg</h3><p>Advanced thinking or reasoning.</p></section>
</article>
<article class="item" data-variant="outline" role="listitem">
<header><A3SAssetImage class="aspect-square w-full rounded-sm object-cover grayscale" path="/assets/images/avatar-2.png" alt="v0-2.0-mini" /></header>
<section><h3>v0-2.0-mini</h3><p>Open Source model for everyone.</p></section>
</article>
</div><div class="flex w-full flex-col gap-4">
<a href="#" class="item">
<section>
<h3>Visit our documentation</h3>
<p>Learn how to get started with our components.</p>
</section>
<aside><svg class="lucide lucide-chevron-right size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg></aside>
</a>
<a href="#" target="_blank" rel="noopener noreferrer" class="item" data-variant="outline">
<section>
<h3>External resource</h3>
<p>Opens in a new tab with security attributes.</p>
</section>
<aside><svg class="lucide lucide-external-link size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg></aside>
</a>
</div><div class="flex min-h-64 w-full items-center justify-center">
<div id="item-dropdown" class="dropdown-menu">
<button type="button" id="item-dropdown-trigger" aria-haspopup="menu" aria-controls="item-dropdown-menu" aria-expanded="false" class="btn w-fit" data-variant="outline">
Select
<svg class="lucide lucide-chevron-down" data-icon="inline-end" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div id="item-dropdown-popover" data-popover data-align="end" aria-hidden="true" class="w-48">
<div role="menu" id="item-dropdown-menu" aria-labelledby="item-dropdown-trigger">
<button type="button" role="menuitem">
<span class="item border-0 p-0 shadow-none" data-size="xs">
<figure>
<span class="avatar" data-size="sm">
<A3SAssetImage class="grayscale" path="/assets/images/avatar-1.png" alt="@shadcn" />
</span>
</figure>
<section class="gap-0">
<h3>shadcn</h3>
<p class="leading-none" aria-label="shadcn@vercel.com">shadcn<span aria-hidden="true">@</span>vercel.com</p>
</section>
</span>
</button>
<button type="button" role="menuitem">
<span class="item border-0 p-0 shadow-none" data-size="xs">
<figure>
<span class="avatar" data-size="sm">
<A3SAssetImage class="grayscale" path="/assets/images/avatar-3.png" alt="@maxleiter" />
</span>
</figure>
<section class="gap-0">
<h3>maxleiter</h3>
<p class="leading-none" aria-label="maxleiter@vercel.com">maxleiter<span aria-hidden="true">@</span>vercel.com</p>
</section>
</span>
</button>
<button type="button" role="menuitem">
<span class="item border-0 p-0 shadow-none" data-size="xs">
<figure>
<span class="avatar" data-size="sm">
<A3SAssetImage class="grayscale" path="/assets/images/avatar-2.png" alt="@evilrabbit" />
</span>
</figure>
<section class="gap-0">
<h3>evilrabbit</h3>
<p class="leading-none" aria-label="evilrabbit@vercel.com">evilrabbit<span aria-hidden="true">@</span>vercel.com</p>
</section>
</span>
</button>
</div>
</div>
</div>
</div>عنصر بسيط يحتوي على عنوان ووصف.
<div class="flex w-full flex-col gap-6" dir="rtl">
<article class="item" data-variant="outline">
<section>
<h3>عنصر أساسي</h3>
<p>عنصر بسيط يحتوي على عنوان ووصف.</p>
</section>
<aside>
<button class="btn" data-variant="outline" data-size="sm">إجراء</button>
</aside>
</article>
<a href="#" class="item" data-variant="outline" data-size="sm">
<figure><svg class="lucide lucide-badge-check size-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"/><path d="m9 12 2 2 4-4"/></svg></figure>
<section><h3>تم التحقق من ملفك الشخصي.</h3></section>
<aside><svg class="lucide lucide-chevron-right size-4 rtl:rotate-180" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg></aside>
</a>
</div>