Icon Button
A square button for one icon, ghost at rest.
Customize
sm
md
lg
As a toggle, turning on lifts the icon to full brightness and springs a 3px accent dot up beneath it; the pin also stands upright. Turning off drops the dot away.
Install
npx shadcn@latest add https://obsydeui.com/r/icon-button.jsonUsage
Import it from where the CLI puts it, or copy the files below by hand.
import { IconButton } from '@/components/obsyde/ember/icon-button/IconButton';
export function Example() {
return (
<IconButton />
);
}
Files
Plain React, TypeScript and CSS. No dependencies. The download keeps these paths.
ember/icon-button/IconButton.tsxcomponentember/icon-button/icon-button.cssstylesember/icon-button/IconButtonDemo.tsxdemoember/actions-kit/kit.tssharedember/shared/accent.tssharedember/shared/spring.tssharedember/shared/ember.cssshared
API
| Prop | Type | Default |
|---|---|---|
accentAccent | 'ember' | 'volt' | 'arc' | 'ember' |
sizeSize | 'sm' | 'md' | 'lg' | 'md' |
pressedPinned | boolean | false |
disabledDisabled | boolean | false |