Component · C-004
IconButton
Square button for an action represented by an icon. It requires an accessible name because the icon alone does not explain the action.
Install
Install koten-theme first when the project has no Koten tokens yet.
npx shadcn@latest add https://koten.codehive.com.co/r/icon-button.jsonAccessibility
- label is required and becomes aria-label; the icon is aria-hidden.
- Focus and the disabled state follow the Button rules, with a visible outline.
- loading adds aria-busy and disables the button while the action runs.
- For a toggle state use ToggleGroup, not an IconButton with a restyled state.