{"id":19655958,"url":"https://github.com/vaadin-component-factory/avatar","last_synced_at":"2025-10-14T18:39:29.347Z","repository":{"id":98740820,"uuid":"183614923","full_name":"vaadin-component-factory/avatar","owner":"vaadin-component-factory","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-15T06:32:59.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T18:39:29.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaadin-component-factory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-26T11:14:07.000Z","updated_at":"2019-05-15T06:33:00.000Z","dependencies_parsed_at":"2023-03-03T15:45:37.274Z","dependency_job_id":null,"html_url":"https://github.com/vaadin-component-factory/avatar","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vaadin-component-factory/avatar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Favatar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Favatar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Favatar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Favatar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaadin-component-factory","download_url":"https://codeload.github.com/vaadin-component-factory/avatar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Favatar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020359,"owners_count":26086866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:25:19.233Z","updated_at":"2025-10-14T18:39:29.330Z","avatar_url":"https://github.com/vaadin-component-factory.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Component Factory Avatar for Vaadin 10+\n\n[Live Demo ↗](https://incubator.app.fi/avatar-demo/avatar)\n\n[\u0026lt;vcf-avatar\u0026gt;](https://vaadin.com/directory/component/vaadin-component-factoryvcf-avatar) is a Web Component for displaying an avatar for a user, their name initials, or a placeholder icon.\n\n# What does the component do?\n\nAvatar displays an image or abbreviation that represents a user.\n\n# How is it used?\n\nAn avatar is visual identifier that represents user by showing image or name abbreviation (in case image is not set). \nA tooltip (enabled by default) can be enabled or disabled to display the name of the avatar when hovering over it.\n\nThe abbreviation is generated from the name initials. E.g. John Smith becomes JS.\n\n### Vaadin Prime\nThis component is part of Vaadin Prime. Still, open source you need to have a valid CVAL license in order to use it. Read more at: vaadin.com/pricing\n\n## Avatar - Image (URL)\n```java\nAvatar avatar = new Avatar();\navatar.setImage(\"https://banner2.kisspng.com/20171216/6c0/google-png-5a3554027e9924.3682726615134443545186.jpg\");\n```\n\n## Avatar - Image (resources)\n\n```java\nAvatar avatar = new Avatar();\nString path = IMAGE_PATH;\navatar.setImage(path,\"image/png\");\n```\n\n## Avatar - Name and tooltip\n\n```java\nAvatar avatar = new Avatar(\"John Smith\");\navatar.setTooltipPosition(TooltipPosition.RIGHT);\navatar.setTooltipAlignment(TooltipAlignment.BOTTOM);\n```\n\nor\n\n```java\nAvatar avatar = new Avatar(\"John Smith\", TooltipPosition.RIGHT, TooltipAlignment.BOTTOM);\n```\n\n## Avatar - Click listener\n```java\nAvatar avatar = new Avatar();\navatar.setName(\"Second Example abbreviation\");\navatar.setTooltipPosition(TooltipPosition.BOTTOM);\navatar.setTooltipAlignment(TooltipAlignment.RIGHT);\n\navatar.addClickListener(clickEvent -\u003e {\n    Notification notification = new Notification(\n            \"You clicked on the avatar\", 3000);\n    notification.open();\n});\n```\n\n## Avatar - Enabling and Disabling tooltip\n```java\nAvatar avatar = new Avatar(\"Sophia Wilson\");\n\nButton actionButton = new Button(\"enable/disable\", event -\u003e {\n    avatar.setToolTipEnabled(!avatar.isToolTipEnabled());\n});\n\n```\n\n# How to run the demo?\n\nThe Demo can be run by going to the project avatar-demo and executing the maven goal:\n\n```mvn jetty:run```\n\nAfter server startup, you'll be able find the demo at[http://localhost:8080/avatar](http://localhost:8080/avatar)\n\n\n## License \u0026 Author\n\nThis Add-on is distributed under [Commercial Vaadin Add-on License version 3](http://vaadin.com/license/cval-3) (CVALv3). For license terms, see LICENSE.txt.\n\nComponent Factory Avatar is written by Vaadin Ltd.\n\n\n## Setting up for development:\n\nClone the project in GitHub (or fork it if you plan on contributing)\n\n```\ngit clone git@github.com:vaadin-component-factory/vcf-avatar.git\n```\n\nto install project to your maven repository run\n \n```mvn install```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaadin-component-factory%2Favatar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaadin-component-factory%2Favatar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaadin-component-factory%2Favatar/lists"}