Anchor Design System

Illustration3.0

The Anchor Illustrations help maintain visual consistency across our applications and platforms by providing a unified language for conveying information.

Introduction

The Anchor Illustrations help maintain visual consistency across our applications and platforms by providing a unified language for conveying information. They serve as visual cues that guide users through the interface, making interactions more intuitive and efficient.

The Illustrations within Anchor are created as vector graphics, allowing them to scale seamlessly across different screen sizes and resolutions. This scalability ensures that illustrations remain crisp and clear, whether viewed on a high-resolution monitor or a mobile device.

Installation

npm i @tryg/vue-ui-library

Usage

<template>
  <div style="width: 400px">
    <anchor-illustration name="female-with-shirt"></anchor-illustration>
  </div>
</template>

Install the component library as a Vue plugin. This globally registers all Anchor components.

main.js
import { createApp } from 'vue';
import { ComponentLibrary } from '@tryg/vue-ui-library';
import App from './App.vue';

const app = createApp(App);
app.use(ComponentLibrary);
app.mount('#app');
YourComponent.vue
<template>
  <anchor-illustration name="female-with-shirt"></anchor-illustration>
</template>

Import only the components you need for optimal bundle size.

YourComponent.vue
<script setup>
import { AnchorIllustration } from '@tryg/vue-ui-library';
</script>
<template>
  <anchor-illustration name="female-with-shirt"></anchor-illustration>
</template>

Available Illustrations

The following illustrations are available in the Anchor design system. Pass the corresponding name to the name prop to use any of them.

YourComponent.vue
<template>
  <anchor-illustration name="advisor"></anchor-illustration>
</template>

CSS variables

You can customize the appearance of illustrations using the following CSS custom properties:

PropertyDescriptionDefault
--illustration-base-colorSet the base/tint color of the illustration
--illustration-primary-colorSet the primary color of the illustrationvar(--b-color-primary-default)
--illustration-stroke-widthSet the stroke width of the illustration1.5
YourComponent.vue
<template>
  <anchor-illustration name="female-with-shirt" style="--illustration-primary-color: var(--b-color-success-default); --illustration-stroke-width: 2.5"></anchor-illustration>
</template>

Accessibility

Illustrations are often decorative elements that support the surrounding content. How you handle accessibility depends on their purpose:

  • Decorative illustrations — When an illustration is purely decorative and adds no meaningful information, set aria-hidden="true" to hide it from assistive technologies:

    <template>
      <anchor-illustration name="office" aria-hidden="true"></anchor-illustration>
    </template>
  • Informational illustrations — When an illustration conveys important meaning, provide an accessible label using aria-label or aria-labelledby to reference a nearby descriptive element:

    <template>
      <anchor-illustration name="signed-document" aria-label="Your document has been signed"></anchor-illustration>
    </template>

Always ensure that any information communicated visually through an illustration is also available through text or assistive technology.

API

anchor-illustration

Properties

PropertyAttributeDescriptionTypeDefault
namenameThis the type of illustration that you want to use"advisor" | "female-close-up" | "female-with-bun" | "female-with-shirt" | "living-room" | "male-close-up" | "male-with-beard" | "male-with-shirt" | "office" | "signed-document"undefined

CSS Custom Properties

NameDescription
--illustration-base-colorSet the color of the illustration.
--illustration-primary-colorSet the color of the illustration. @default var(--b-color-primary-default)
--illustration-stroke-widthSet the stroke width of the illustration. @default 1.5

Built with StencilJS

On this page