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| Name | Type | Default | Description |
|---|---|---|---|
icon | ReactNode | None | The icon or thumbnail shown in the middle. A sample glyph shows when left out. |
label | string | "Star" | Name of the item, read by screen readers and shown as the caption. |
showLabel | boolean | false | Shows the name under the icon. |
tag | string | "Free" | Small text in the top corner on hover, such as a plan or type. |
showAdd | boolean | true | Shows the round add button in the bottom corner on hover. |
addLabel | string | "Add to collection" | Screen reader text of the add button. |
selected | boolean | false | Marks the cell as picked: the hover look stays on. |
size | number | 118 | Cell width and height, in px. |
iconSize | number | 36 | Icon size, in px. |
hoverScale | number | 1.1 | How much the icon grows on hover; 1 keeps it still. |
radius | number | 0 | Corner radius, in px. |
bordered | boolean | true | Draws a hairline around the cell. |
borderColor | string | "var(--border)" | Hairline colour. |
backgroundColor | string | "transparent" | Cell fill at rest. |
hoverColor | string | "var(--muted)" | Cell fill on hover. |
iconColor | string | "var(--foreground)" | Icon colour. |
corners | boolean | true | Shows 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. |
cornerSize | number | 5 | Size of each corner mark, in px. |
cornerInset | number | 6 | Distance of bracket marks from the cell edge, in px. |
cornerWidth | number | 1.5 | Bracket thickness, in px. |
accentColor | string | "var(--foreground)" | Colour of the corner marks, tag and add button. |
duration | number | 0.2 | Seconds the hover takes. |
disabled | boolean | false | |
onClick | (event: MouseEvent<HTMLButtonElement>) => void | None | Called when the cell is clicked. |
onAdd | (event: MouseEvent<HTMLButtonElement>) => void | None | Called when the add button is clicked. |
className | string | "" | |
style | CSSProperties | None |