Tool Call Card
A copy-paste ai / chat ui component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
AI / Chat UIHTMLCSSany framework
search_docsRunning
Arguments
{ "query": "refund policy", "limit": 5 }Copy into your project
HTML
<!-- Tool Call Card — function-call in progress with collapsible arguments -->
<div class="nuda-ac2-toolcall">
<div class="nuda-ac2-toolcall__head">
<span class="nuda-ac2-toolcall__icon" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M14.7 6.3 A 4 4 0 0 1 8.4 12.6 L3 18 L6 21 L11.4 15.6 A 4 4 0 0 1 17.7 9.3 Z" />
</svg>
</span>
<span class="nuda-ac2-toolcall__name">search_docs</span>
<span class="nuda-ac2-toolcall__status">
<i class="nuda-ac2-toolcall__dot" aria-hidden="true"></i>
Running
</span>
</div>
<details class="nuda-ac2-toolcall__args" open>
<summary class="nuda-ac2-toolcall__summary">Arguments</summary>
<pre class="nuda-ac2-toolcall__code">{ "query": "refund policy", "limit": 5 }</pre>
</details>
</div>CSS
.nuda-ac2-toolcall {
width: 300px;
padding: 10px;
background: #141414;
border: 1px solid rgba(255,255,255,.1);
border-radius: 10px;
font: 12px ui-sans-serif,system-ui,sans-serif;
color: #cfcfcf;
box-sizing: border-box;
}
.nuda-ac2-toolcall__head {
display: flex;
align-items: center;
gap: 8px;
}
.nuda-ac2-toolcall__icon {
width: 22px;
height: 22px;
flex: none;
display: flex;
align-items: center;
justify-content: center;
background: rgba(228,255,84,.12);
border-radius: 6px;
color: #e4ff54;
}
.nuda-ac2-toolcall__icon svg {
width: 12px;
height: 12px;
}
.nuda-ac2-toolcall__name {
font-weight: 700;
color: #fafafa;
font-family: ui-monospace,Menlo,monospace;
font-size: 12px;
}
.nuda-ac2-toolcall__status {
margin-left: auto;
display: inline-flex;
align-items: center;
gap: 5px;
color: #777;
font-size: 10px;
text-transform: uppercase;
letter-spacing: .04em;
}
.nuda-ac2-toolcall__dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #e4ff54;
flex: none;
animation: _nuda-ac2toolcall 1.4s ease-in-out infinite;
}
.nuda-ac2-toolcall__args {
margin-top: 8px;
}
.nuda-ac2-toolcall__summary {
cursor: pointer;
color: #a1a1aa;
font-size: 11px;
list-style: none;
display: flex;
align-items: center;
gap: 6px;
min-height: 20px;
}
.nuda-ac2-toolcall__summary::-webkit-details-marker {
display: none;
}
.nuda-ac2-toolcall__summary::before {
content: "";
width: 6px;
height: 6px;
border-right: 1.5px solid #777;
border-bottom: 1.5px solid #777;
transform: rotate(-45deg);
transition: transform .2s;
}
.nuda-ac2-toolcall__args[open] .nuda-ac2-toolcall__summary::before {
transform: rotate(45deg);
}
.nuda-ac2-toolcall__code {
margin: 6px 0 0;
padding: 8px;
background: #0a0a0a;
border: 1px solid rgba(255,255,255,.08);
border-radius: 6px;
color: #9fe08f;
font-family: ui-monospace,Menlo,monospace;
font-size: 11px;
white-space: pre-wrap;
word-break: break-word;
}
@keyframes _nuda-ac2toolcall {
0%,100% {
opacity: .4;
transform: scale(.8);
}
50% {
opacity: 1;
transform: scale(1.15);
}
}
@media (prefers-reduced-motion: reduce) {
.nuda-ac2-toolcall__dot {
animation: none !important;
opacity: 1;
transform: none !important;
}
}
How to use Tool Call Card
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.