Skip to content
Cojeev UI

Icon and icon button

Data display

Renders named SVG icons and provides supporting icon-button and decorative disk primitives.

React · copy into your project · light and dark themes

Try it

Loading preview…

Take it with you

Copy the example, API and usage notes for your editor or AI assistant.

Add to your project

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/icon.json

The command includes the component’s shared dependencies. Your project keeps editable source files.

Include the complete example

This example also composes animated-icon, button, input, label. Install its parts together:

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/icon.json https://luv-jeri.github.io/cojeev-ui/r/animated-icon.json https://luv-jeri.github.io/cojeev-ui/r/button.json https://luv-jeri.github.io/cojeev-ui/r/input.json https://luv-jeri.github.io/cojeev-ui/r/label.json

Using icon and icon button

  • Browse and search the icon pack in the live example. AnimatedIcon adds configurable motion; StateChevron follows open and closed trigger state.

  • Choose a supported icon name and size, then pair it with text to reinforce an action or status.

  • Use IconButton for an icon-only action and Disk when the icon needs a containing surface.

  • Friendly action aliases include check-circle, close, alert, loader, refresh and trash.

  • Default feedback responds once to the nearest enabled control with action-specific SVG-part motion. Set feedback={false} to opt out; draw mode owns its own animation.

  • The iconActionNames and iconActionDescriptions exports describe all 100 semantic actions. The searchable example pages through the complete family; new geometry retains Lucide and Feather license notices.

API

Compose the exported parts below. The prop types are read from the React source during the registry build.

Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.

IconProps

PropTypeRequired
namestring | undefinedYes
size"default"|"sm"|"lg"No
drawbooleanNo
feedback

One-shot feedback from the nearest control. Disable when another owner animates this icon.

booleanNo

DiskProps

PropTypeRequired
variant"default" | "pink" | "yellow" | "blue" | "olive" | "ink" | "cream" | "beige" | null | undefinedNo
size"default" | "sm" | "lg" | null | undefinedNo

IconButtonProps

PropTypeRequired
variant"default" | "pink" | "ink" | "cream" | "dashed" | "beige" | null | undefinedNo
size"default" | "sm" | "lg" | "xl" | null | undefinedNo

Accessibility

  • Icons are hidden from assistive technology by default; give an IconButton its own accessible action name.

States and appearance

resthoverpresseddisabled

For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.

Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.