Skip to content
Cynosurev0.5.0
SearchStorybookGitHubnpmColour mode: System. Switch to Light

Components / Feedback and display

IconTile

A Facet icon on a tinted square or circle: the mark of a feature, a settings section, a stat or a list item. It is decorative unless you give it a label. For a person or a team use Avatar; for an icon inside a line of text use Icon.

Default

When to useLink to "When to use"

  • Feature grids and cards: a tile beside or above each feature's title.
  • Settings sections and empty states: a mark that sets the subject at a glance.
  • Inside other components: Stat takes an icon, and List draws one per item with marker="tile".

Use something else when:

  • it stands for a person, a team or an account: Avatar
  • it should do something when pressed: IconButton
  • the icon sits inside a line of text or a button: Icon
  • it shows a status word: Badge

UsageLink to "Usage"

tsx
Copy
import { IconTile } from "@arshad-shah/cynosure";
import { zap } from "@arshad-shah/cynosure/icons";

<IconTile icon={zap} />
<IconTile icon={zap} label="Fast builds" />
<IconTile icon={zap} tone="success" variant="solid" size="lg" shape="circle" />

SizesLink to "Sizes"

sm, md and lg are the control heights, so a tile lines up with a Button of the same size and grows with the theme's scale. The icon is half the tile.

Sizes follow control heights

Tones and variantsLink to "Tones and variants"

soft (default) is a tint of the tone, solid fills with it and outline draws a tinted border on the surface. The icon uses the tone's readable text colour, or the on-tone colour on solid.

Tones and variants

Square and circleLink to "Square and circle"

Square and circle

PropsLink to "Props"

Every prop of IconTile
PropWhat it doesTypeDefault
iconRequired
The Facet icon drawn on the tile.IconData
label
Accessible name. With it the tile is an image (role="img") named by it; without it the tile is decorative and hidden from assistive technology, for when text beside it says the same thing.string
size
Width and height: the control heights, so they scale with the theme. Default "md".Size"md"
tone
Semantic colour. Default "accent".Tone"accent"
variant
soft tinted fill, solid full tone fill, outline a tinted border on the surface. Default "soft"."soft" | "solid" | "outline""soft"
shape
Outline: a square with rounded corners, or a circle. Default "square"."circle" | "square""square"
className
Added to the root element, for layout.string
style
Layout only. Restyle through --cy-icon-tile-* tokens.CSSProperties

Generated from the type definitions in @arshad-shah/cynosure 0.5.0.

Behaviour and accessibilityLink to "Behaviour and accessibility"

Behaviour and accessibility, table 1
SettingWhat assistive technology gets
no label (default)Nothing: the tile is aria-hidden. Text beside it names the thing
label="Analytics"One image (role="img") named "Analytics"; the SVG inside stays hidden
  • Keyboard: none. A tile is never focusable.
  • Forced colours: the fill is dropped; a CanvasText border keeps the shape and the icon draws in CanvasText.

TouchLink to "Touch"

Nothing in a tile can be pressed, so it has no hit area. Put it in a Card with href or onClick to make the whole card the target.

ThemingLink to "Theming"

Theming, table 2
TokenDefaultWhat it sets
--cy-icon-tile-size-{sm,md,lg}--cy-control-height-{sm,md,lg}Width and height
--cy-icon-tile-radiussize times --cy-radius-factorCorner radius of the square
--cy-icon-tile-soft-mix16%Tint strength of soft
--cy-icon-tile-icon-scale0.5Icon size as a fraction of the tile
ts
Copy
createTheme({ components: { iconTile: { radius: "4px", iconScale: "0.6" } } });

className and style are for layout only. Change the look through tokens so every product stays consistent.

Avatar · Stat · List · Badge · Icon

These examples run Cynosure 0.5.0 (commit 50ce30b), the version on npm.

Getting started
Theming
Icons
Accessibility
Code editors and highlighters
Using Cynosure without React
Build-tool adapters
Components
Accordion
AppShell
AspectRatio
Breadcrumbs
Calendar
Card
Container
Disclosure
Divider
DocumentViewport
Grid
Inline
PageHeader
PanZoomCanvas
ScrollArea
SideNav
SortableList
SplitPane
Stack
StatusBar
Tabs
TitleBar
Toolbar
Tree
VirtualList
ZoomControls
Announcer
Avatar
Badge
CodeBlock
DescriptionList
EmptyState
ErrorBoundary
Field
Heading
IconTile
Image
Kbd
List
LoadingDots
Notice
ProgressBar
Prose
Skeleton
Stat
Steps
Table
Text
Button
Checkbox
Checklist
ColorField
ColorSwatches
Combobox
CompareSlider
CopyButton
DateField
FileDrop
IconButton
KeyValueEditor
Link
NumberField
Pagination
PathField
RadioGroup
SearchField
SegmentedControl
Select
SelectionFrame
SignaturePad
Slider
Switch
TagInput
TextArea
TextField
ThemeToggle
TimeField
ButtonBase
ChoiceBase
DialogBase
FileInputBase
HiddenValue
Icon
InputBase
LinkBase
LiveRegion
TextAreaBase
ChatMessage
Choice
DataGrid
DeviceFrame
HighlightedText
HotkeyField
ListRow
OptionList
OverlayFrame
QRCode
RowActions
Section
SiteFooter
SiteHeader
SkipLink
SortButton
VisuallyHidden
CommandPalette
ContextMenu
Dialog
FloatingToolbar
HoverCard
Menu
Menubar
Popover
ProgressOverlay
Sheet
Toast
Tooltip
Changelog