Symbols
@c2n/symbols is a set of spot illustrations, one web component each: c2-symbol-<name>. Use them wherever a view needs a
picture rather than an icon: the media of a c2-status-panel, an empty table or list, a 404 page, an onboarding step,
a payment confirmation, a permission prompt. The set covers empty states, status and celebration, errors and limits,
security and privacy, commerce, communication, files and data, and onboarding.
The artwork is drawn for this library on one 160×160 grid. Every colour in it comes from a small set of colour roles
(backdrop, surface, outline, accent, a golden highlight, success, warning, error), so the whole set follows @c2n/theme — brand colour and
dark mode included — and one CSS variable recolours a role everywhere.
Installation
npm install @c2n/symbolsImport
Import individual symbols to keep bundles small:
import '@c2n/symbols/symbols/empty-inbox.js'
import '@c2n/symbols/symbols/no-results.js'or register the whole set at once:
import '@c2n/symbols'Examples
Size a symbol with --c2-symbol--size and recolour it through its roles. Setting --c2-symbol__backdrop--color to
transparent removes the disc behind the artwork.
In a status panel
Slot a symbol into the panel’s media slot and set media="illustration": the panel drops its tinted status disc (the
symbol brings its own backdrop) and sizes the artwork with --c2-status-panel__illustration--size.
A success state reads the same way:
Accessibility
A symbol is decorative by default: its SVG is hidden from assistive technology, which is right when a heading next to it
already says what it shows. When the picture carries meaning on its own, give it a label; it is then exposed as an image
with that name.
<c2-symbol-offline label="You are offline"></c2-symbol-offline>Theming
| Role | Variable | Follows the theme token |
|---|---|---|
| Size | --c2-symbol--size | — |
| Outline | --c2-symbol--stroke-width | — |
| Backdrop | --c2-symbol__backdrop--color | --c2-theme--color-surface-container |
| Surface | --c2-symbol__surface--color | --c2-theme--color-surface |
| Muted | --c2-symbol__muted--color | --c2-theme--color-outline-variant |
| Outline | --c2-symbol__line--color | --c2-theme--color-outline-strong |
| Ink | --c2-symbol__ink--color | --c2-theme--color-on-surface-variant |
| Accent | --c2-symbol__primary--color | --c2-theme--color-primary |
| Soft accent | --c2-symbol__primary-soft--color | --c2-theme--color-primary-container |
| Highlight | --c2-symbol__accent--color | — (golden: stars, coins, confetti) |
| Success | --c2-symbol__success--color | — (stays green) |
| Warning | --c2-symbol__warning--color | — (stays amber) |
| Error | --c2-symbol__error--color | --c2-theme--color-error |
API
Every symbol element shares the same API.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
label | string | — | Accessible name. When set the symbol is exposed as an image with this name; when empty it is decorative and hidden from assistive technology, which is right when a heading next to it already says the same thing. |
CSS custom properties
Grouped by semantic target and state from --c2-<component>__<target>__<state>--<property>. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-symbol--size | length | 120px | Width and height of the symbol. |
--c2-symbol--stroke-width | number | 3 | Outline width, in units of the 160x160 canvas. |
--c2-symbol__backdrop--color | color | #f4f4f5 | Soft disc behind the artwork. |
--c2-symbol__surface--color | color | #ffffff | Faces of objects (paper, screens, boxes) and marks drawn on coloured shapes. |
--c2-symbol__muted--color | color | #e4e4e7 | Secondary fills: shadows, inactive bars, the inside of a box. |
--c2-symbol__line--color | color | #a1a1aa | Default outline colour. |
--c2-symbol__ink--color | color | #71717a | Small solid details: handles, dots, clock hands. |
--c2-symbol__primary--color | color | #0265dc | Accent fills and strokes. |
--c2-symbol__primary-soft--color | color | #edf1fe | Soft accent fills: a lens, a folder back, a chat bubble. |
--c2-symbol__accent--color | color | #fbbf24 | Decorative warm highlight: stars, coins, light bulbs, flames, confetti. |
--c2-symbol__success--color | color | #16a34a | Success badges and check marks. |
--c2-symbol__warning--color | color | #f59e0b | Warning badges and hazard signs. |
--c2-symbol__error--color | color | #dc2626 | Error badges and strike-throughs. |
All symbols
Empty states
c2-symbol-empty-boxc2-symbol-empty-cartc2-symbol-empty-folderc2-symbol-empty-inboxc2-symbol-empty-trashc2-symbol-no-bookmarksc2-symbol-no-codec2-symbol-no-datac2-symbol-no-downloadsc2-symbol-no-eventsc2-symbol-no-favoritesc2-symbol-no-filesc2-symbol-no-historyc2-symbol-no-imagesc2-symbol-no-integrationsc2-symbol-no-locationc2-symbol-no-logsc2-symbol-no-mediac2-symbol-no-messagesc2-symbol-no-musicc2-symbol-no-notificationsc2-symbol-no-resultsc2-symbol-no-reviewsc2-symbol-no-tagsc2-symbol-no-tasksc2-symbol-no-usersStatus and celebration
c2-symbol-achievementc2-symbol-all-donec2-symbol-celebrationc2-symbol-coffee-breakc2-symbol-errorc2-symbol-expiredc2-symbol-healthc2-symbol-infoc2-symbol-milestonec2-symbol-out-of-officec2-symbol-pendingc2-symbol-quiet-hoursc2-symbol-reminderc2-symbol-scheduledc2-symbol-successc2-symbol-syncingc2-symbol-update-availablec2-symbol-verifiedc2-symbol-warningErrors and limits
c2-symbol-broken-linkc2-symbol-bugc2-symbol-cloud-errorc2-symbol-disconnectedc2-symbol-low-batteryc2-symbol-maintenancec2-symbol-not-foundc2-symbol-offlinec2-symbol-page-errorc2-symbol-rate-limitedc2-symbol-server-errorc2-symbol-storage-fullc2-symbol-timeoutc2-symbol-unsupported-devicec2-symbol-upload-failedSecurity and privacy
c2-symbol-account-lockedc2-symbol-biometricc2-symbol-blockedc2-symbol-camera-deniedc2-symbol-cookie-consentc2-symbol-email-verificationc2-symbol-forbiddenc2-symbol-hiddenc2-symbol-location-deniedc2-symbol-microphone-deniedc2-symbol-password-resetc2-symbol-passwordc2-symbol-securec2-symbol-security-alertc2-symbol-sign-inc2-symbol-sign-outc2-symbol-two-factorc2-symbol-unlockedc2-symbol-vaultCommerce and payments
c2-symbol-credit-cardc2-symbol-deliveryc2-symbol-discountc2-symbol-earningsc2-symbol-empty-wishlistc2-symbol-giftc2-symbol-invoicec2-symbol-no-ordersc2-symbol-package-deliveredc2-symbol-payment-failedc2-symbol-payment-successc2-symbol-premiumc2-symbol-returnsc2-symbol-savingsc2-symbol-shopping-bagc2-symbol-storec2-symbol-walletCommunication
c2-symbol-announcementc2-symbol-callc2-symbol-contactsc2-symbol-conversationc2-symbol-faqc2-symbol-feedbackc2-symbol-helpc2-symbol-invitec2-symbol-languagec2-symbol-mail-sentc2-symbol-new-messagec2-symbol-notificationc2-symbol-sharec2-symbol-supportc2-symbol-thank-youc2-symbol-video-callFiles and data
c2-symbol-agreementc2-symbol-analyticsc2-symbol-archivec2-symbol-attachmentc2-symbol-backupc2-symbol-clipboardc2-symbol-databasec2-symbol-documentc2-symbol-exportc2-symbol-folder-sharedc2-symbol-importc2-symbol-linkc2-symbol-printc2-symbol-reportc2-symbol-spreadsheetc2-symbol-uploadc2-symbol-version-controlOnboarding and features
c2-symbol-ai-assistantc2-symbol-apic2-symbol-appearancec2-symbol-automationc2-symbol-connectedc2-symbol-create-newc2-symbol-customizec2-symbol-desktopc2-symbol-explorec2-symbol-goalsc2-symbol-growthc2-symbol-guidec2-symbol-ideac2-symbol-launchc2-symbol-learnc2-symbol-locationc2-symbol-magicc2-symbol-mobile-appc2-symbol-onboardingc2-symbol-preferencesc2-symbol-profilec2-symbol-qr-scanc2-symbol-searchc2-symbol-serverc2-symbol-setupc2-symbol-teamc2-symbol-templatesc2-symbol-welcomeNo symbol matches.