Tobago Demo

Menu

Image

Create an image with <tc:image/>.

Tag Library Documentation

Basics

<tc:image value="#{request.contextPath}/image/tobago_head.png"/>

Set width

To set the size of an image, <tc:style/> can be used.

<tc:image value="#{request.contextPath}/image/tobago_head.png"> <tc:style width="20%"/> </tc:image>

Disable

The disabled attribute can be used, to let the picture look more 'disabled'.

Disabled off

Disabled is 'false' by default.

<tc:image disabled="false" value="#{request.contextPath}/image/alps.png"/>

Disabled on

<tc:image disabled="true" value="#{request.contextPath}/image/alps.png"/>

Using Font Icons

Bootstrap Icons

Since Tobago 5 Bootstrap Icons is shipped with Tobago.

<tc:image id="bi" value="bi-emoji-smile"/> Example:

Font Awesome

Font Awesome is not longer shipped with Tobago. But it is stil integratable, like in this demo. You need to add the resources manually.

<tc:image id="fa" value="fa-coffee"/> Example:
© 2005-2023 Apache Software Foundation, Licensed under the Apache License, Version 2.0.