Skip to content
PixiKit

Icon Cell

A square cell for an icon or asset picker. Hover lights the cell, marks its four corners with dots and brings up a small tag and an add button in the corner.

pixikit.com/docs/components/icon-cell

Customize

Show label
Show add
Selected
Size118px
Icon size36px
Hover scale1.10
Radius0px
Bordered
Border color
Background color
Hover color
Icon color
Corners
Corner style
Corner size5px
Corner inset6px
Corner width1.5px
Accent color
Duration0.20s
Disabled

Props

28
NameTypeDefaultDescription
iconReactNodeNoneThe icon or thumbnail shown in the middle. A sample glyph shows when left out.
labelstring"Star"Name of the item, read by screen readers and shown as the caption.
showLabelbooleanfalseShows the name under the icon.
tagstring"Free"Small text in the top corner on hover, such as a plan or type.
showAddbooleantrueShows the round add button in the bottom corner on hover.
addLabelstring"Add to collection"Screen reader text of the add button.
selectedbooleanfalseMarks the cell as picked: the hover look stays on.
sizenumber118Cell width and height, in px.
iconSizenumber36Icon size, in px.
hoverScalenumber1.1How much the icon grows on hover; 1 keeps it still.
radiusnumber0Corner radius, in px.
borderedbooleantrueDraws a hairline around the cell.
borderColorstring"var(--border)"Hairline colour.
backgroundColorstring"transparent"Cell fill at rest.
hoverColorstring"var(--muted)"Cell fill on hover.
iconColorstring"var(--foreground)"Icon colour.
cornersbooleantrueShows the four corner marks on hover.
cornerStyle"dot" | "bracket""dot"`dot` is a round dot on each corner, `bracket` an L-shaped mark inside it.
cornerSizenumber5Size of each corner mark, in px.
cornerInsetnumber6Distance of bracket marks from the cell edge, in px.
cornerWidthnumber1.5Bracket thickness, in px.
accentColorstring"var(--foreground)"Colour of the corner marks, tag and add button.
durationnumber0.2Seconds the hover takes.
disabledbooleanfalse
onClick(event: MouseEvent<HTMLButtonElement>) => voidNoneCalled when the cell is clicked.
onAdd(event: MouseEvent<HTMLButtonElement>) => voidNoneCalled when the add button is clicked.
classNamestring""
styleCSSPropertiesNone

More interaction components in Pro

View all

Related