[ Data Display ]
IconTile
A tinted app-icon tile for your logo or any icon, with a soft glow and an optional corner badge, e.g. your logo with the current screen’s icon.
2 examplesDark modeAccessible
Import#
import { IconTile } from 'reusify-ui';When to use#
- Headers of auth screens, empty states, onboarding steps, app and integration lists.
Examples#
Logo with a badge#
Children fill the tile when they are a 32×32 SVG (like a logo glyph); regular icons are drawn at half the tile size.
import { ReusifyGlyph } from './brand/ReusifyLogo';
<IconTile color="#7c6fff" badge={<FiLogIn />} label="Reusify">
<ReusifyGlyph />
</IconTile>
<IconTile color="#10b981" badge={<FiShield />} label="Reusify">
<ReusifyGlyph />
</IconTile>
<IconTile color="#f97316" badge={<FiInbox />} label="Reusify">
<ReusifyGlyph />
</IconTile>Icons, sizes and radius#
<IconTile color="info" size={32} glow={false}><FiCloud /></IconTile>
<IconTile color="success"><FiCheck /></IconTile>
<IconTile color="#ec4899" size={64} radius={999} badge={<FiHeart />}><FiMusic /></IconTile>API reference#
<IconTile />
| Prop | Type | Default | Description |
|---|---|---|---|
color | semantic | string | 'primary' | Tile color; the gradient, glow and badge icon follow it. |
size | number | 48 | Tile size in px. |
radius | number | string | 30% of size | Corner radius. |
badge | ReactNode | - | Icon in a round badge on the bottom-right corner. |
glow | boolean | true | Colored shadow under the tile. |
label | string | - | Accessible name; without it the tile is decorative. |
children | ReactNode | - | Logo SVG or icon. |
color'primary'semantic | stringTile color; the gradient, glow and badge icon follow it.
size48numberTile size in px.
radius30% of sizenumber | stringCorner radius.
badge-ReactNodeIcon in a round badge on the bottom-right corner.
glowtruebooleanColored shadow under the tile.
label-stringAccessible name; without it the tile is decorative.
children-ReactNodeLogo SVG or icon.
Accessibility#
- With label the tile is role="img"; without it, it is hidden from assistive tech. The badge is always decorative.