LightIconButton composes IconButton with a ghost surface and a small size. Supply an accessible name and decorative icon content.
Usage
size="xs" and are 20px.
State and interaction
Button owns keyboard activation, disabled and loading behavior, refs, native attributes, and render composition. The native default istype="button". Use aria-pressed for toggles and aria-expanded for disclosures. The application owns these states and can set color="accent" to highlight a selected action. Keyboard focus uses the shared focus ring.
Tooltip text is optional and does not replace aria-label. Set href for a link and supply render when the application owns routing.
Updating existing controls
ImportLightIconButton from twenty-ui/components. Replace Icon={IconPlus} with <IconPlus /> children, small/medium with sm/md, accent="tertiary" with emphasis="subtle", and testId with data-testid. Replace synthetic active and focus flags with semantic state and actual keyboard focus.
Replace LightIconButtonGroup with ButtonGroup using attached={false} and explicit children. Set disabled on unavailable actions, including actions without a click handler. Wrappers and tooltip triggers can remain around each child.
Menu item icon buttons
MenuItem, MenuItemDraggable, and MenuItemAvatar accept JSX through iconButtons. Pass one LightIconButton directly, or use ButtonGroup for multiple buttons. The menu controls their placement and hover visibility; each button owns its accessible name, click handler, and disabled state. Wrap dropdown triggers directly around the button.
MenuItemIconButton types. A button without an onClick handler can remain enabled when a surrounding dropdown owns its interaction. Set disabled explicitly for unavailable buttons.
Props
string
required
Required accessible name describing the action.
ReactNode
required
Icon content. Decorative and hidden from assistive technology.
string | ((state: ButtonState) => string | undefined)
CSS class applied to the element, or a function that
returns a class based on the component’s state.
"accent" | "danger" | "neutral" | "success"
Semantic color of the button.
boolean
Adds a shadow to the button.
"standard" | "subtle"
default:"standard"
Standard secondary text or subtle tertiary text. Semantic colors and solid surfaces keep their own colors.
boolean
default:"false"
Whether the button should be focusable when disabled.
boolean
Shows a loading indicator and disables activation while preserving the button width.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState>
Caller-supplied root element or renderer. Preserve a native button, or an anchor when
href is set. Router integration belongs to the caller."round" | "square"
Square or round icon control.
"md" | "sm" | "xs"
default:"sm"
Button size:
xs (20px), sm (24px), or md (32px).CSSProperties | ((state: ButtonState) => CSSProperties | undefined)
Style applied to the element, or a function that
returns a style object based on the component’s state.
string
Text displayed when hovering or focusing the button.
number
Delay before showing the tooltip.
number
Distance in pixels between the button and the tooltip.
"bottom" | "left" | "right" | "top"
Preferred placement of the tooltip relative to the button.
"ghost" | "outline" | "soft" | "solid"
default:"ghost"
Visual treatment of the button surface.