Skip to content
Vertical Jump Designs-uiFront-End Studio
Get Pro

v3.9 is out.

Layout & primitives

Icon

Free14.2 KB gzipped

Inline SVG icon. Render a built-in icon with name, or pass your own SVG content as children. Decorative by default (hidden from assistive technology); pass label when the icon conveys meaning on its own.

Accessibility: WCAG 2.2 AA · No A or AA violations in light or dark mode · No keyboard interaction of its own · Full report

Import

tsx
import { Icon, AccessibilityIcon } from "@vjdesigns/vjdesigns-ui";

Importing only Icon adds about 14.2 KB of minified, gzipped JavaScript to your app (React not included). The stylesheet is shared by every component and loaded once: 75.1 KB gzipped.

Examples

Sizes and tones

Every icon is its own component. They're decorative (hidden from screen readers) unless you give them a label.

tsx
import {
  CheckIcon,
  Flex,
  HeartFilledIcon,
  Stack,
  StarIcon,
  WarningIcon,
} from "@vjdesigns/vjdesigns-ui";

export function SizesAndTones() {
  return (
    <Stack gap={4} align="center">
      <Flex gap={4} align="center">
        <StarIcon size="xs" />
        <StarIcon size="sm" />
        <StarIcon size="md" />
        <StarIcon size="lg" />
        <StarIcon size="xl" />
      </Flex>
      <Flex gap={4} align="center">
        <CheckIcon tone="success" size="lg" />
        <WarningIcon tone="warning" size="lg" />
        <HeartFilledIcon tone="danger" size="lg" />
        <StarIcon tone="primary" size="lg" />
        <StarIcon tone="muted" size="lg" />
      </Flex>
    </Stack>
  );
}

Meaningful

Give an icon a label when it carries meaning on its own. spin rotates it (and respects reduced motion).

Jordan Lee

tsx
import { CheckIcon, Flex, LoaderIcon, Text } from "@vjdesigns/vjdesigns-ui";

export function Meaningful() {
  return (
    <Flex gap={6} align="center">
      <Flex gap={2} align="center">
        <CheckIcon tone="success" label="Verified" />
        <Text>Jordan Lee</Text>
      </Flex>
      <LoaderIcon spin label="Loading" />
    </Flex>
  );
}

By name

Icon with a name picks an icon by string, which is handy when the icon comes from data.

Events

Messages

Settings

tsx
import { Flex, Icon, Text } from "@vjdesigns/vjdesigns-ui";

export function ByName() {
  const items = [
    { icon: "calendar", label: "Events" },
    { icon: "mail", label: "Messages" },
    { icon: "settings", label: "Settings" },
  ] as const;
  return (
    <Flex gap={6} wrap="wrap">
      {items.map((item) => (
        <Flex key={item.label} gap={2} align="center">
          <Icon name={item.icon} tone="primary" />
          <Text>{item.label}</Text>
        </Flex>
      ))}
    </Flex>
  );
}

Accessibility

Icons are decorative unless you give them a label; then they get role="img" and that name. Here the warning icon carries meaning on its own, while the check icon sits beside text that already says it.

3 invoices are overdue.

Payment received

tsx
import {
  CheckIcon,
  Flex,
  Stack,
  Text,
  WarningIcon,
} from "@vjdesigns/vjdesigns-ui";

export function Accessibility() {
  return (
    <Stack gap={3}>
      <Flex align="center" gap={2}>
        <WarningIcon tone="warning" label="Warning" />
        <Text>3 invoices are overdue.</Text>
      </Flex>
      <Flex align="center" gap={2}>
        <CheckIcon tone="success" />
        <Text>Payment received</Text>
      </Flex>
    </Stack>
  );
}

Accessibility icons

Accessibility icons mark accessibility features and services. labeled gives each one a built-in name (here "Wheelchair accessible", "Hearing loop", "Sign language" and "Audio description"), so you don't write or translate it yourself. Without labeled or label they're decorative, like the others.

Transcript available

tsx
import {
  AudioDescriptionIcon,
  Flex,
  HearingLoopIcon,
  SignLanguageIcon,
  Text,
  TranscriptIcon,
  WheelchairIcon,
} from "@vjdesigns/vjdesigns-ui";

export function AccessibilityIcons() {
  return (
    <Flex gap={6} align="center" wrap="wrap">
      <WheelchairIcon size="lg" labeled />
      <HearingLoopIcon size="lg" labeled />
      <SignLanguageIcon size="lg" labeled />
      <AudioDescriptionIcon size="lg" labeled />
      <Flex gap={2} align="center">
        <TranscriptIcon tone="primary" />
        <Text>Transcript available</Text>
      </Flex>
    </Flex>
  );
}

Accessibility icon by name

AccessibilityIcon picks one by name, for icons that come from data, such as a venue's list of services.

tsx
import { AccessibilityIcon, Flex } from "@vjdesigns/vjdesigns-ui";

export function AccessibilityIconByName() {
  const services = ["ramp", "elevator", "braille", "screen-reader"] as const;
  return (
    <Flex gap={6} align="center" wrap="wrap">
      {services.map((name) => (
        <AccessibilityIcon key={name} name={name} size="lg" tone="primary" labeled />
      ))}
    </Flex>
  );
}

Accessibility icons translated

The built-in names come in every bundled language: inside a French LocaleProvider, the wheelchair icon is read as "Accessible en fauteuil roulant". Icons that show movement face the reading direction, so the wheelchair, ramp and blind icons mirror in right-to-left layouts.

tsx
import {
  BlindIcon,
  Flex,
  RampIcon,
  Stack,
  WheelchairIcon,
  LocaleProvider,
} from "@vjdesigns/vjdesigns-ui";
import ar from "@vjdesigns/vjdesigns-ui/locales/ar";
import fr from "@vjdesigns/vjdesigns-ui/locales/fr";

export function AccessibilityIconsTranslated() {
  return (
    <Stack gap={4}>
      <LocaleProvider locale="fr" messages={fr}>
        <Flex gap={4} align="center">
          <WheelchairIcon size="lg" labeled />
          <RampIcon size="lg" labeled />
          <BlindIcon size="lg" labeled />
        </Flex>
      </LocaleProvider>
      <LocaleProvider locale="ar" messages={ar}>
        <Flex gap={4} align="center">
          <WheelchairIcon size="lg" labeled />
          <RampIcon size="lg" labeled />
          <BlindIcon size="lg" labeled />
        </Flex>
      </LocaleProvider>
    </Stack>
  );
}

Translated

An icon's label is your own text, so translate it with the page; LocaleProvider sets lang so it's read in French.

3 factures sont en retard.

tsx
import {
  Flex,
  Text,
  WarningIcon,
  LocaleProvider,
} from "@vjdesigns/vjdesigns-ui";
import fr from "@vjdesigns/vjdesigns-ui/locales/fr";

export function Translated() {
  return (
    <LocaleProvider locale="fr" messages={fr}>
      <Flex align="center" gap={2}>
        <WarningIcon tone="warning" label="Attention" />
        <Text>3 factures sont en retard.</Text>
      </Flex>
    </LocaleProvider>
  );
}

All icons

75 icons and 20 accessibility icons, each exported as its own component. Select one to copy its JSX.

Accessibility icons

For accessibility features and services. Add labeled for a built-in name in every bundled language.

Interface icons

API reference

Icon

Icon props
PropTypeDefault
name

Built-in icon to render. Takes precedence over children.

IconName—
children

Custom SVG content on a 24x24 grid (pass viewBox to change the grid). Used when name is not set.

ReactNode—
size

Size: xs 12px, sm 16px, md 20px, lg 24px, xl 32px, 2xl 48px, or a number of pixels.

IconSize—
tone

Color. Defaults to inherit (currentColor).

"neutral""primary""accent""success""warning""danger""info""inherit""muted"—
strokeWidth

Stroke width on the 24x24 grid. Applies to stroke-based icons.

number—
label

Accessible name. When set, the icon is meaningful (role="img" plus aria-label). When omitted, the icon is decorative and hidden from assistive technology (aria-hidden="true", focusable="false").

string—
spin

Rotates the icon continuously (for loader). Stops under reduced motion.

boolean—

Also accepts standard HTML attributes, plus className, style and ref.

AccessibilityIcon

New in 3.9.0

Icons for accessibility features and services: wheelchair access, audio description and transcripts, hearing loops, sign language, display settings, and alternative input. (Captions are Icon name="captions".) Same props as Icon, plus labeled, which turns on a built-in accessible name in every bundled language. Decorative by default.

Drawn to stricter rules than the main set, all checked on every release: readable at 16px, never mistakable for another icon at that size, inside a safe area, and painted only with currentColor so tones, dark mode, and Windows High Contrast recolor them. Icons that show movement (wheelchair, ramp, blind) mirror in right-to-left layouts. Use them at 16px (sm) or larger.

AccessibilityIcon props
PropTypeDefault
nameRequired

Accessibility icon to render.

AccessibilityIconName—
labeled

Give the icon its built-in accessible name, translated by LocaleProvider (for example "Wheelchair accessible"), so screen readers announce it as an image. label wins when both are set. Leave both off when nearby text already says the same thing: the icon is then decorative.

boolean—
size

Size: xs 12px, sm 16px, md 20px, lg 24px, xl 32px, 2xl 48px, or a number of pixels.

IconSize—
tone

Color. Defaults to inherit (currentColor).

"neutral""primary""accent""success""warning""danger""info""inherit""muted"—
strokeWidth

Stroke width on the 24x24 grid. Applies to stroke-based icons.

number—
label

Accessible name. When set, the icon is meaningful (role="img" plus aria-label). When omitted, the icon is decorative and hidden from assistive technology (aria-hidden="true", focusable="false").

string—
spin

Rotates the icon continuously (for loader). Stops under reduced motion.

boolean—

Also accepts standard HTML attributes, plus className, style and ref.

See what changed in each version in the Changelog.

Accessibility report

Icon targets WCAG 2.2 AA. Below: a live axe-core audit of this page's examples, Lighthouse scores for the page in both modes, the accessibility behavior built into the component, and the checks only a person can do.

axe-core audit (live)

Running accessibility audit

Checking the examples above…

Lighthouse audit

Light mode

Score 100

38 passed · 0 failed · 27 not applicable · 10 to check by hand

Dark mode

Score 100

38 passed · 0 failed · 27 not applicable · 10 to check by hand

Lighthouse 13.5.0 audits the whole docs page (header and sidebar included), not just the examples, in English. Last run 11/27/2026. Some failed audits carry no weight in the score, so a page can score 100 and still list one.

Built-in behavior

Keyboard

Not focusable, so there's no keyboard interaction of its own.

Roles and states

Roles and states
ElementRoleStates and properties
<svg> (default)nonearia-hidden="true": decorative
<svg> with labelimgaria-label
Accessibility icon <svg> with labeledimgaria-label: its built-in name from LocaleProvider ("Wheelchair accessible"); label wins when both are set

Manual checks

Automated tools find roughly a third of accessibility issues. Test these in your app, with your content.

Manual accessibility checks
CheckWhat to testWCAG 2.2
KeyboardEvery action works with Tab, Shift+Tab, Enter, Space and the arrow keys, and focus never gets stuck.2.1.1 (A), 2.1.2 (A)
FocusFocus moves in a logical order, is always visible, and isn't hidden behind sticky headers.2.4.3 (A), 2.4.7 (AA), 2.4.11 (AA), 2.4.13 (AAA)
Screen readersNames, roles and states are announced correctly, and status changes are announced without moving focus.1.3.1 (A), 4.1.2 (A), 4.1.3 (AA)
ColorMeaning never depends on color alone; your own colors meet contrast in both modes.1.4.1 (A), 1.4.3 (AA), 1.4.11 (AA), 1.4.6 (AAA)
Zoom and reflowAt 200% text size and at 320px wide (400% zoom), nothing is cut off and no sideways scrolling is needed.1.4.4 (AA), 1.4.10 (AA), 1.4.12 (AA)
Pointer targetsClick and tap targets are at least 24×24px (44×44px for AAA), or spaced so they don't overlap.2.5.8 (AA), 2.5.5 (AAA)
MotionAnimations respect the reduced-motion setting.2.3.3 (AAA)