Skip to content

Icon Button

A square button for one icon, ghost at rest.

Download
Customize

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.json

Usage

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.tsxcomponent
  • ember/icon-button/icon-button.cssstyles
  • ember/icon-button/IconButtonDemo.tsxdemo
  • ember/actions-kit/kit.tsshared
  • ember/shared/accent.tsshared
  • ember/shared/spring.tsshared
  • ember/shared/ember.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
sizeSize'sm' | 'md' | 'lg''md'
pressedPinnedbooleanfalse
disabledDisabledbooleanfalse