Icons
SVG icon components for use as indicators, triggers, and decorative elements. The item is the shared icon namespace; it currently ships Chevron, the one glyph the library draws as SVG (every other system glyph is mono text).
Installation
dgadd ships in @diffgazer/add on npm: pnpm add -D @diffgazer/add puts it on pnpm exec, and npx @diffgazer/add runs it without the install.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS from the installed package.
Usage
Examples
All Directions
Animated Toggle
API Reference
Chevron
Accessibility
Notes
Animation
Set open={true} to rotate the chevron 90° clockwise from its base direction. Uses CSS transition-transform for smooth animation. The Animated Toggle example also renders the closed and open states side by side, so the rotation is verifiable without interacting.
Accessibility
Chevron defaults to `aria-hidden="true"` for decorative use. For a meaningful standalone icon, set `aria-hidden={false}`, `role="img"`, and an accessible name such as `aria-label`.
Reusability
Chevron is used as the default trigger indicator by Accordion, Select, and Sidebar. Installing any of these components auto-installs Icons via registryDependencies. Each supports a handle prop to customize or hide it.
Source
Install via CLI: pnpm exec dgadd add ui/icons.
Highlighted source loads after this disclosure opens. Browse the source repository.