@inventage-web-components/avatar-image
Version:
An avatar image based on user initials.
46 lines (31 loc) • 1.88 kB
Markdown
# @inventage-web-components/avatar-image
An avatar image based on user initials.
[](https://www.npmjs.com/package/@inventage-web-components/avatar-image)
[](https://github.com/inventage/web-components/blob/main/LICENSE)
[](https://github.com/inventage/web-components/actions)
[](https://bundlephobia.com/package/@inventage-web-components/avatar-image@latest)
## Quick Start
Use [unpkg.com](https://unpkg.com/browse/@inventage-web-components/avatar-image/) to get a simple example running in a single HTML file:
```html
<script type="module" src="https://unpkg.com/@inventage-web-components/avatar-image/lib/src/avatar-image.js?module"></script>
<avatar-image input="John Doe"></avatar-image>
```
Here's an [example of this method](https://catkin-bottlenose-beetle.glitch.me/) to get you started.
## Installation
```bash
npm i @inventage-web-components/avatar-image
```
## Usage
```html
<!--
Adjust path to node_modules and use a dev server that support Node module
resolution, like Web Dev server: https://www.npmjs.com/package/@web/dev-server
-->
<script
type="module"
src="/node_modules/@inventage-web-components/avatar-image/lib/src/avatar-image.js"
</script>
<avatar-image input="John Doe"></avatar-image>
```
## Documentation
The API documentation as well as interactive examples can be found in the [Storybook examples](https://inventage.github.io/web-components/?path=/story/avatar-image--default).