sheengemologic ui
All components

IconButton

A square native icon action with a required accessible name and matching tooltip.@gemologic/sheen · primitives

Playground

<IconButton label="More actions" loading={false} placement="top" size="md" tone="neutral" type="button" variant="ghost"><span>⋯</span></IconButton>

Variant matrix

More actions
type: button
type: submit
type: reset
variant: solid
variant: soft
variant: outline
variant: ghost
variant: link
tone: neutral
tone: accent
tone: danger
tone: success
size: xs
size: sm
size: md
size: lg
placement: top
placement: bottom
placement: left
placement: right

Anatomy

Package
@gemologic/sheen
Source
packages/ui/src/primitives/IconButton.tsx
Tokens
  • --sheen-button-radius
  • --sheen-control-h-md
  • --sheen-color-accent
  • --sheen-color-bg-raised
  • --sheen-elevation-raised
  • --sheen-duration-fast
  • --sheen-icon-size-md

Accessibility

Role: buttonKeyboard: Tab, Shift+Tab, Enter, Space, Escape dismisses tooltip

Do

  • Describe the action, not the icon's appearance.
  • Supply noninteractive icon content; the label provides its accessible name.

Do not

  • Do not nest interactive controls or use this for navigation.
  • Do not duplicate a typed shortcut action with a separate useShortcut registration.

Generated props

NameTypeDefaultDescription
label *stringRequired nonempty action name, also shown in the tooltip.
children *JSX.ElementRequired noninteractive icon content, hidden from the accessible name.
type"button" | "submit" | "reset"buttonNative action, submission, or reset behavior.
shortcutstring | import("../index.ts").ShortcutActionA string displays a hint only; a typed shortcut action also registers the trigger and displays its platform-formatted binding.
variantNonNullable<"solid" | "soft" | "outline" | "ghost" | "link" | undefined> | undefinedghostVisual treatment; solid accent actions should be rare.
toneNonNullable<"neutral" | "accent" | "danger" | "success" | undefined> | undefinedneutralSemantic color role, independent of visual treatment.
sizeNonNullable<"xs" | "sm" | "md" | "lg" | undefined> | undefinedmdDensity-aware control size.
loadingbooleanfalseMarks pending work and disables activation.
placement"top" | "bottom" | "left" | "right"topPreferred side, with viewport collision handling.
openDelaynumber500Hover opening delay in milliseconds; keyboard focus opens immediately.
closeDelaynumber100Pointer departure delay in milliseconds, preserving a hoverable path to the content.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.