Kendo UI for jQuery Avatar Overview
The Kendo UI for jQuery Avatar is typically used to display images, icons or initials representing people or other entities.
It also gives you the flexibility to customize its border radius, size, color, etc.
The Avatar is part of Kendo UI for jQuery, a
professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
Initializing the Avatar
To initialize the Avatar, you can use any div
element. The following example demonstrates how to initialize the Avatar.
<div id="avatar"></div>
<script>
$(document).ready(function(){
$("#avatar").kendoAvatar({
text: "IMG"
});
});
</script>
Referencing Existing Instances
You can access an existing Avatar instance by using the .data()
jQuery method which gets executed by the jQuery object of the originating element.
<div id="avatar"></div>
<script>
$(document).ready(function(){
$("#avatar").kendoAvatar();
});
var avatar = $('#avatar').data('kendoAvatar');
</script>
Accessibility and Keyboard Navigation
The alt option can be used when the type is set to image
. This value will be used to populate the alt attribute of the <img>
element.
The Avatar is a non-focusable element.