Components
Using components
pangpond-ds doesn't ship its own components. Products use shadcn's, unchanged, and the tokens make them look like the product.
Gallery
Stock shadcn components with no edits. Switch the theme or mode in the header and they all follow.
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
// …every component here is the file shadcn add wrote, uneditedAdding a component
Install from shadcn as usual. The props, examples and accessibility notes live in shadcn's docs. This page only covers what pangpond-ds adds.
npx shadcn@latest add button dialog inputUpdating is the same command with --overwrite. Check git diff afterwards and put any product tweaks back.
Rules
- Don't restyle colors on 1 component. No
bg-*ortext-*color overrides. If a product needs a different primary, set--primaryin its theme, and every component changes together. - Don't add
duration-*orease-*to transitions.theme.cssmakes every bare transition use--duration-instant(150ms) andease-out. Open and close animations (dialogs, menus) keep shadcn's own timing. - Edit the component file only when you must. Every edit is something you put back by hand after the next
--overwrite. Write it down so it isn't lost.
Notes per component
Only components we've decided something about. Everything else: follow shadcn.
Button
- Buttons behave like the pangpond portfolio: colors fade with the default transition, and pressing shrinks the button to
--press-scale(0.97) instantly, instead of shadcn's 1px nudge. Link buttons and menu triggers don't shrink.theme.cssdoes this, so the component file stays stock. Set--press-scale: 1to turn the press off. - 1
defaultbutton per view, for the main action. Everything else issecondary,outlineorghost.destructiveonly for actions that lose data. - Labels are verbs that say what happens: "Save changes", not "OK".
- Icon-only buttons use an
iconsize and need anaria-label. - A link that looks like a button stays a link. Use
buttonVariants()on the<Link>, wrapped incn(). Without it, the baseborder-transparentbeats the outline border.
<Link href="/docs/installation" className={cn(buttonVariants({ variant: "outline" }))}>
Read the docs <ArrowRight data-icon="inline-end" />
</Link>Interaction utilities
Patterns from the pangpond portfolio that shadcn doesn't have. They ship in theme.css, so you use them as plain classes. Hover, press and tab through the examples.
Built with Base UI and the shadcn CLI.
Project card
pressable + hover-zoom
<nav className="flex gap-4 text-sm">
<a href="#" className="link-quiet">Work</a>
<a href="#" className="link-quiet">About</a>
</nav>
<p>Built with <a href="#" className="link-prose">Base UI</a>.</p>
<a href="#" className="pressable focus-ring block rounded-xl">
<div className="overflow-hidden rounded-xl">
<img className="hover-zoom" src="…" alt="" />
</div>
</a>| Utility | Use for |
|---|---|
link-quiet | Nav, footer and secondary links. Muted text that turns full on hover |
link-prose | Links in running text. A faint underline that darkens on hover |
pressable | Cards and large click targets. Shrinks to 0.98 while pressed |
hover-zoom | An image inside a pressable or group. Zooms to 1.03 on hover. Put overflow-hidden on its wrapper |
focus-ring | Keyboard focus on custom interactive elements. shadcn components have their own |
When to make our own
A component gets its own registry item only when 1 of these is true. Until then, note what you changed in the product.
- A product needs a change the tokens can't make, and a 2nd product needs the same change.
- 2 or more products need something shadcn doesn't have, like an empty state or a page header.
Why not our own copies now?
shadcn add. Stock components already follow every theme, so copies would only buy small details.