Clay
Skip to ContentClayClay by Liferay
  • Get Started
    • Introduction
    • What is Clay
    • Importing the JS Component
    • Using JS Components with Metal.js
    • Web Components
  • Foundations
    • Grid
    • Typography
  • Lexicon Core Components
    • Alerts
    • Badges
    • Buttons
    • Cards
    • Charts
      • Advanced Examples
        • Axis Label
        • Axis Range
        • Data Color
        • Gridlines
        • Predictive forecasting
        • Regions
        • X Axis Tick Formatting
      • Basic Examples
        • Bar Chart
        • Bubble Chart
        • Combination Chart
        • Donut Chart
        • Gauge Chart
        • Geomap Chart
        • Line Chart
        • Pie Chart
        • Scatter Chart
        • Spline Chart
        • Step Chart
    • Dataset Display
    • Dropdown Menu
    • Forms
      • Checkbox, Radio, and Toggle
      • Forms
      • Forms Hierarchy
      • Forms Navigation
      • Multi Step Form
      • Multi Step Form Simplified
      • Selectors
      • Text Input
      • Text Input Group
      • Text Input Localizable
      • Text Input Variations
    • Icons
    • Labels
    • Link
    • List
    • Loading Indicator
    • Modals
    • Navigation
      • Breadcrumbs
      • Navigation Bar
      • Vertical Navigation
    • Pagination
    • Popovers and Tooltips
    • Progress Bars
    • Sidebar
      • Info Panel
    • Stickers
    • Table
      • Inline Edit Table
      • Table
    • Tabs
    • Toolbars
      • Management Toolbar
  • CSS Framework
    • SCSS
    • Class Helpers
    • Satellite Components
      • Alerts
      • Badges
      • Button Group
      • Cards
      • Dropdown Menu
      • Forms
        • Form Elements
        • Form Elements (Input Groups)
        • Form Elements (Validation)
      • Images (Aspect Ratios)
      • Images and Thumbnails
      • Labels
      • Links
      • List Groups
      • Modals
      • Nav
      • Navigation
        • Header
      • Paginations
      • Panels
      • Popovers and Tooltips
      • Progress Bars
      • Stickers
      • Tables
      • Tbar (Toolbar)
      • Timelines
      • Toggle Switch
    • Page Examples
      • Card View Template
      • Document Upload
      • List View Template
      • Table View Template
      • Users and Organizations
  • News

Icons

Description

Icons are a visual representation of an idea and/or action.

Check the Lexicon Icons Pattern for a more in-depth look at the motivations and proper usage of this component.

Lexicon Icons

Lexicon icons do not use the same format as Font Awesome or Bootstrap's Glyphicons.

We use SVG elements that link to an SVG sprite. See the example below:

{call ClayIcon.render}
	{param spritemap: 'path/to/icons.svg' /}
	{param symbol: 'add-column' /}
{/call}

{call ClayIcon.render}
	{param spritemap: 'path/to/icons.svg' /}
	{param symbol: 'add-cell' /}
{/call}
<clay-icon spritemap="path/to/icons.svg" symbol="add-column"></clay-icon>

<clay-icon spritemap="path/to/icons.svg" symbol="add-cell"></clay-icon>
<svg class="lexicon-icon">
	<use href="path/to/icons.svg#add-column" />
</svg>

Note that the ID after the # symbol is the ID of the icon to use. For example, if you wanted to use the plus icon, you would specify the following path: path/to/icons.svg#plus. See the example below:

Why do we use SVG?

  • add-cell
  • add-column
  • add-role
  • add-row
  • adjust
  • align-center
  • align-image-center
  • align-image-left
  • align-image-right
  • align-justify
  • align-left
  • align-right
  • analytics
  • angle-down
  • angle-left
  • angle-right
  • angle-up
  • announcement
  • anonymize
  • api-lock
  • api-web
  • archive
  • arrow-end
  • arrow-join
  • arrow-split
  • arrow-start
  • arrow-up-full
  • arrow-xor
  • asterisk
  • audio
  • autosize
  • bars
  • bell-full
  • bell-off
  • bell-on
  • blogs
  • bold
  • bolt
  • bookmarks
  • box-container
  • breadcrumb
  • briefcase
  • calendar
  • camera
  • cards-full
  • cards
  • cards2
  • caret-bottom-l
  • caret-bottom
  • caret-double-l
  • caret-double
  • caret-left-l
  • caret-left
  • caret-right-l
  • caret-right
  • caret-top-l
  • caret-top
  • catalog
  • categories
  • chain-broken
  • change-list-disabled
  • change-list
  • change
  • check-circle-full
  • check-circle
  • check-square
  • check
  • chip
  • circle
  • cloud
  • code
  • cog
  • color-picker
  • columns
  • comments
  • community
  • compress
  • control-panel
  • credit-card
  • custom-field
  • custom-size
  • cut
  • date
  • decimal
  • desktop
  • device-check
  • devices
  • diagram
  • diamond
  • diary
  • document-code
  • document-compressed
  • document-default
  • document-image
  • document-multimedia
  • document-pdf
  • document-pending
  • document-presentation
  • document-table
  • document-text
  • document-vector
  • document
  • documents-and-media
  • download
  • drag
  • drop
  • dynamic-data-list
  • dynamic-data-mapping
  • edit-layout
  • effects
  • ellipsis-h
  • ellipsis-v
  • embed
  • envelope-closed
  • envelope-open
  • environment-connected
  • environment-disconnected
  • environment
  • exclamation-circle
  • exclamation-full
  • expand
  • file-script
  • file-template
  • file-xsl
  • filter
  • flag-empty
  • flag-full
  • folder
  • format
  • forms
  • full-size
  • geolocation
  • globe
  • google
  • grid
  • h1
  • h2
  • hashtag
  • hdd
  • heart-full
  • heart
  • hidden
  • home
  • horizontal-scroll
  • hr
  • import-export
  • import-list
  • import
  • indent-less
  • indent-more
  • info-book
  • info-circle-open
  • info-circle
  • info-panel-closed
  • info-panel-open
  • information-live
  • integer
  • italic
  • liferay-ac
  • link
  • list-ol
  • list-ul
  • list
  • live
  • lock-dots
  • lock
  • logout
  • magic
  • mark-as-answer
  • mark-as-question
  • megaphone-full
  • merge
  • message-boards
  • message
  • minus-circle
  • mobile-device-rules
  • mobile-landscape
  • mobile-portrait
  • moon
  • move-folder
  • move
  • myspace
  • number
  • oauth
  • open-id
  • order-arrow-down
  • order-arrow-left
  • order-arrow-right
  • order-arrow-up
  • order-arrow
  • organizations
  • page-template
  • page
  • pages-tree
  • paperclip
  • paragraph
  • password-policies
  • paste
  • pause
  • pencil
  • phone
  • picture
  • pin-full
  • pin
  • play
  • plug
  • plus-squares
  • plus
  • polls
  • print
  • product-menu-closed
  • product-menu-open
  • product-menu
  • propagation
  • question-circle-full
  • question-circle
  • quote-left
  • quote-right
  • radio-button
  • redo
  • reload
  • remove-role
  • remove-style
  • reply
  • repository
  • reset
  • restore
  • rss-full
  • rss
  • rules
  • search
  • select-from-list
  • select
  • separator
  • share-alt
  • share
  • sheets
  • shield-check
  • shopping-cart
  • shortcut
  • sign-in
  • simple-circle
  • simulation-menu-closed
  • simulation-menu-open
  • simulation-menu
  • site-template
  • sites
  • social-facebook
  • social-instagram
  • social-linkedin
  • social-twitter
  • social-vimeo
  • spacer
  • square-hole
  • square
  • staging
  • star-half
  • star-o
  • star
  • sticky
  • strikethrough
  • subscript
  • suitcase
  • sun
  • superscript
  • table
  • table2
  • tablet-landscape
  • tablet-portrait
  • tag
  • test
  • text-editor
  • text
  • textbox
  • third-party
  • thumbs-down
  • thumbs-up-arrow
  • thumbs-up
  • time
  • times-circle-full
  • times-circle
  • times-small
  • times
  • transform
  • trash
  • truck
  • twitter
  • underline
  • undo
  • unlock
  • unpin
  • upload-multiple
  • upload
  • urgent
  • user-plus
  • user
  • users
  • vertical-scroll
  • video
  • view
  • vocabulary
  • warning-full
  • warning
  • web-content
  • wiki-page
  • wiki
  • workflow

Language Flags

People tend to have pretty strong opinions on whether flags should be used as a visual cue for indicating a language, mainly because in many parts of the world the flag may have cultural and geographic meanings that we might not be aware of, or the flag itself isn't fully accurate to the dialects spoken in that region.

While we understand this reasoning, we've found that when a user is not familiar with the currently displayed language, flags somewhat eliminate the use of other mechanisms, such as the name of the language (since the current language could be in an entirely different character set). Given this, there is often at least some familiarity with the identity of a country that speaks a shared language.

Or, to paraphrase Winston Churchill, "Using flags is the worst system for indicating language, except for all others". :)

To use the flags below, follow the same process as you would for a standard icon, and use the locale and country code indicated in parenthesis for the icon's name (e.g. to use the Japanese icon, you would use ja-jp)

  • Arabic (Saudi Arabia) (ar-sa)
  • Bulgarian (Bulgaria) (bg-bg)
  • Catalan (Andorra) (ca-ad)
  • Catalan (Spain) (ca-es)
  • Czech (Czech Republic) (cs-cz)
  • Danish (Denmark) (da-dk)
  • German (Germany) (de-de)
  • Greek (Greece) (el-gr)
  • English (Australia) (en-au)
  • English (United Kingdom) (en-gb)
  • English (United States) (en-us)
  • Spanish (Spain) (es-es)
  • Estonian (Estonia) (et-ee)
  • Basque (Spain) (eu-es)
  • Persian (Iran) (fa-ir)
  • Finnish (Finland) (fi-fi)
  • French (Canada) (fr-ca)
  • French (France) (fr-fr)
  • Galician (Spain) (gl-es)
  • Hindi (India) (hi-in)
  • Croatian (Croatia) (hr-hr)
  • Hungarian (Hungary) (hu-hu)
  • Indonesian (Indonesia) (in-id)
  • Italian (Italy) (it-it)
  • Hebrew (Israel) (iw-il)
  • Japanese (Japan) (ja-jp)
  • Kazakh (Kazakhstan) (kk-kz)
  • Korean (South Korea) (ko-kr)
  • Laotian (Laos) (lo-la)
  • Lithuanian (Lithuania) (lt-lt)
  • Malay (Malaysia) (ms-my)
  • Norwegian (Norway) (nb-no)
  • Dutch (Belgium) (nl-be)
  • Dutch (Netherlands) (nl-nl)
  • Polish (Poland) (pl-pl)
  • Portuguese (Brazil) (pt-br)
  • Portuguese (Portugal) (pt-pt)
  • Romanian (Romania) (ro-ro)
  • Russian (Russia) (ru-ru)
  • Slovak (Slovakia) (sk-sk)
  • Slovenian (Slovenia) (sl-si)
  • Serbian (Serbia) (sr-rs)
  • Serbian (Serbia) (sr-rs)
  • Swedish (Sweden) (sv-se)
  • Tamil (India) (ta-in)
  • Thai (Thailand) (th-th)
  • Turkish (Turkey) (tr-tr)
  • Ukrainian (Ukraine) (uk-ua)
  • Vietnamese (Vietnam) (vi-vn)
  • Chinese (China) (zh-cn)
  • Chinese (Taiwan) (zh-tw)

SVG Icons as Background Images

We have created a Sass function to turn Lexicon SVG icon's into data uri schemes, which enables you to use them as a background images on an HTML element. The Sass function clay-icon(icon-name, color) takes the name of a Lexicon SVG Icon and a color. For example, the Sass rule set .site-add-cell { background-image: clay-icon(add-cell, #5AF); background-size: contain; display: inline-block; height: 20px; width: 20px; } will place the SVG icon add-cell as a background-image on any element with class site-add-cell.

add-cell add-column add-row adjust align-center asterisk times-circle workflow

Clay-svg-url()

You can turn your custom SVG into a data uri using the Sass function clay-svg-url($svg), where $svg is the code for your inline SVG. The function returns url(your_svg_as_data_uri).

When using `clay-svg-url()`, wrap your inline SVG code with single quotes if your SVG's attributes are delimited with double quotes.

Linux Tux

Why do we use SVG?

Font icons, while fairly simple, suffer drawbacks, such as sub-pixel aliasing. This results in a lower quality than we would like. SVG gives us and you a greater amount of freedom in styling the icons, as well as a higher level of fidelity and clarity in the icons. Also, SVG supports multi-color icons, as shown below:

Except as otherwise noted, the content of this site is licensed under CC BY-SA 4.0 license.