Tinted square container for icons: feature bullets, status markers and accent surfaces. Tones follow the Alert convention (ink text on a tint) so contrast is pre-audited.
Design intent
IconTile gives feature bullets, status markers and accent icons a consistent tinted container. Tones follow the Alert convention (ink text on a tint) so contrast is pre-audited, and sizes stay on the spacing scale.
npx @slipstream-ui/cli@latest add icon-tileProps
| Prop | Type | Default | Description |
|---|---|---|---|
| tone | 'default' | 'primary' | 'success' | 'warning' | 'info' | 'destructive' | 'default' | Tint and ink pairing. |
| size | 'sm' | 'md' | 'lg' | 'md' | Tile edge: sm h-8, md h-10, lg h-12. |
| badge | ReactNode | — | Count or status marker pinned to the top-right corner. |
| className | string | — | Additional CSS classes to apply. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't put interactive content inside
IconTile is a presentational span. Interactive tiles belong in a Button or link.
tsx// Avoid<IconTile onClick={...}><Icon /></IconTile>// Prefer<button className="..."><IconTile><Icon /></IconTile></button>
Accessibility
- Presentational span — label the Icon inside when the tile conveys status.
- Tone pairs reuse the audited Alert tint/ink tokens.
Content guidelines
Badge values
- Use numbers for counts
- Cap long values (99+) at the call site
- Use a short glyph only for status dots
Good examples
- 3
- 12
- •
Bad examples
- many
- New!
Composition
Compose with Icon: Icon inside IconTile inherits the tile svg sizing; pass tone only when overriding
<IconTile tone="success"><Icon icon={CheckIcon}/></IconTile>
Compose with FeatureRow: IconTile pairs with feature rows for consistent marketing grids
<FeatureRow icon={<IconTile tone="primary"><ZapIcon/></IconTile>} title="Fast"/>
Related components: Icon, IconButton, FeatureRow
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.