Skip to content

IconTile

A decorative icon on a rounded tinted tile, for feature lists, onboarding steps and empty states. The text beside it carries the meaning.

  • Pro, mobile
  • Version 2.0.0-rc.1
  • APG pattern: Decorative image (hidden from assistive technology)

Examples

Still previews of the real component, rendered from its stories. Pro code isn’t public, so nothing in them responds. Switch the theme and density for every preview at once.

Default

  • Smart replies drafted for you
  • Encrypted end to end
  • Quiet hours at night
Show the code

Default, code

<ul className="flex max-w-sm flex-col gap-gap-md">
  <li className="flex items-center gap-gap-md"><IconTile icon={Sparkles} tone="brand" /><span className="text-body-md text-fg">Smart replies drafted for you</span></li>
  <li className="flex items-center gap-gap-md"><IconTile icon={ShieldCheck} tone="success" /><span className="text-body-md text-fg">Encrypted end to end</span></li>
  <li className="flex items-center gap-gap-md"><IconTile icon={Bell} /><span className="text-body-md text-fg">Quiet hours at night</span></li>
</ul>

Tones

Show the code

Tones, code

<div className="flex flex-col gap-gap-md">
  {(['md', 'lg'] as const).map((size) => (
    <div key={size} className="flex flex-wrap gap-gap-sm">
      <IconTile size={size} icon={Star} tone="neutral" />
      <IconTile size={size} icon={Sparkles} tone="brand" />
      <IconTile size={size} icon={ShieldCheck} tone="success" />
      <IconTile size={size} icon={TriangleAlert} tone="warning" />
      <IconTile size={size} icon={TriangleAlert} tone="danger" />
      <IconTile size={size} icon={Info} tone="info" />
    </div>
  ))}
</div>

Tokens

The 14 design tokens IconTile reads, with the value each has in the theme and density chosen above. Change a token and the component follows, in Figma and in code.

Show all 14 tokens
Tokens IconTile reads
TokenValue nowCSS variable
color.bg.brand-subtle…--sd-color-bg-brand-subtle
color.bg.danger-subtle…--sd-color-bg-danger-subtle
color.bg.info-subtle…--sd-color-bg-info-subtle
color.bg.muted…--sd-color-bg-muted
color.bg.success-subtle…--sd-color-bg-success-subtle
color.bg.warning-subtle…--sd-color-bg-warning-subtle
color.icon.brand…--sd-color-icon-brand
color.icon.danger…--sd-color-icon-danger
color.icon.default…--sd-color-icon-default
color.icon.info…--sd-color-icon-info
color.icon.success…--sd-color-icon-success
color.icon.warning…--sd-color-icon-warning
radius.lg…--sd-radius-lg
radius.xl…--sd-radius-xl

Install

Pro components come as source from the SuperDuper registry, with a licence key from Solo, Team or Studio. The registry and checkout aren’t open yet.

Add it from the registry (Pro licence key)

npx shadcn@latest add @superduperui/icon-tile

Then import it

import { IconTile } from "@/components/ui/icon-tile"

Props

IconTile props
PropTypeWhat it does
iconrequiredLucideIconA Lucide icon from the subset.
size'md' | 'lg'Default 'md'md (default): a 40px tile with a 20px icon; lg: a 56px tile with a 24px icon.
tone'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info'Default 'neutral'The tile's tint. Decorative: the text beside the tile carries the meaning, never the colour.
classNamestring

When to use it

Use it for

  • Feature lists and onboarding steps
  • The leading visual of a ListRow or an EmptyState

Use something else for

  • An icon that means something on its own: use Icon with a label
  • Anything people press: use IconButton

Accessibility

Screen readers announce Nothing (decorative); the text beside it is read.

WCAG 2.2 AAA criteria the component meets in Comfortable density: 1.4.6, 1.4.9, 2.3.2.

Not interactive: density changes nothing.

What your product still has to do

  • Put the meaning in the text beside the tile, never in its colour

This release’s test results

Test results for IconTile in this release
axe-core (WCAG A, AA, AAA and best practice)60 runs across every story, theme, density and width: 0 violations
Rendered text contrast40 text runs: 0 below 7:1, lowest 16.71:1
Target size0 targets: 0 under 44px in Comfortable
Focus appearance (2.4.13)0 focus stops in 0 browser engines: all pass

Manual passes with VoiceOver and NVDA haven’t been done yet.

In Figma

The Figma component is IconTile, with Size (Medium, Large); Tone (Neutral, Brand, Success, Warning, Danger, Info). The Figma library isn’t published yet.

Figma to code: Size → size (Medium = "md", Large = "lg"); Tone → tone (Neutral = "neutral", Brand = "brand", Success = "success", Warning = "warning", Danger = "danger", Info = "info"); Icon → icon.