Wasim's Site

Liferay Taglib Reference

Searchable reference for liferay-ui, aui, clay, and liferay-frontend JSP tags with attributes, usage snippets, and rendered HTML.

Found 45 of 45 tags

Tip: Tags here are a curated set of the most-used Liferay taglib tags across the four core taglibs. Click any tag to expand its attributes, a copy-ready JSP usage snippet, and the typical HTML it renders. For new UI, prefer the clay tags over the older aui and liferay-ui equivalents.

The Four Core Liferay Taglibs

Liferay JSPs are built almost entirely from taglib tags. Knowing which of the 45+ common tags to reach for — and which taglib it belongs to — saves constant trips to the javadoc-style taglibdocs. This reference groups the most-used tags by their four core prefixes:

liferay-ui
http://liferay.com/tld/ui

Classic, JSP-based UI tags. The oldest and broadest set — search containers, icons, messages, asset display.

aui
http://liferay.com/tld/aui

AlloyUI form and layout tags. Still widely used for <aui:form> and <aui:input>, though Clay is preferred for new UI.

clay
http://liferay.com/tld/clay

Clay (Lexicon) component tags — the modern Liferay 7.1+ design system. Buttons, cards, alerts, dropdowns.

liferay-frontend
http://liferay.com/tld/frontend

Higher-level frontend building blocks — management bars, edit forms, modals, screen navigation.

How to Declare a Taglib in a JSP

Add a taglib directive at the top of your JSP (or, more commonly, rely on the shared init.jsp that most modules include):

<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/clay" prefix="clay" %>
<%@ taglib uri="http://liferay.com/tld/frontend" prefix="liferay-frontend" %>

Frequently Asked Questions

What are the main Liferay taglibs?
The four most common are liferay-ui (classic JSP UI tags like search-container and icon), aui (AlloyUI form and grid tags like aui:form and aui:input), clay (the modern Lexicon design-system tags such as clay:button and clay:alert), and liferay-frontend (higher-level building blocks like management bars, edit forms, and screen navigation).
Should I use aui or clay tags for new development?
Prefer clay for new UI. Clay implements the current Lexicon design language and is what Liferay itself uses in DXP 7.1+. The aui tags still work and remain common for forms (aui:form, aui:input), but clay components produce the up-to-date markup and styling.
Does this tool render live taglib output?
No — Liferay taglibs execute on the server against a live portal context (themeDisplay, permissions, the request), so they cannot run in a static browser tool. Each entry instead shows a hand-authored example of the typical HTML the tag renders, which is accurate for the common case.
How do I declare a taglib in my JSP?
Add a taglib directive at the top of the JSP, for example <%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>. Most module JSPs include a shared init.jsp that already declares all of these prefixes, so you usually just reference the tags directly.
Is this every Liferay tag?
No. Liferay ships hundreds of tags across many taglibs. This reference is a curated set of the most frequently used tags so you can find the common ones fast. Use the official taglibdoc link on each entry for the complete attribute list.

Official Resources