AnchorButton¶
-
/libs/granite/ui/components/coral/foundation/anchorbutton
Hyperlink is a component to represent a standard HTML hyperlink (<a>), but to look like a button.
It has the following content structure:
-
granite:AnchorButton
- granite:commonAttrs
- granite:renderCondition
- hrefstringel
The href attribute.
- href_i18nstringel
- i18n
The href attribute. This is usually used to produce different value based on locale.
- targetstring
The target attribute.
- textstring
- i18n
The body text of the element.
- hideTextboolean
Visually hide the text. It is RECOMMENDED that every button has a text for a11y purpose. Use this property to hide it visually, while still making it available for a11y.
-
x-cq-linkcheckerstring
- skip
- valid
The x-cq-linkchecker attribute.
- iconstring
The icon name. e.g. “search”.
-
iconSizestring
- S
- XS
- S
- M
- L
The size of the icon.
-
sizestring
- M
- M
- L
The size of the button.
- blockboolean
true
to render the button as a block element;false
otherwise.
-
variantstring
- primary
- warning
- quiet
- minimal
- actionBar
The variant of the button.
- commandstring
Command used as a shortcut for the action. It accepts single keys, sequenques and key modifiers. Command will override actionConfigName.
When
ctrl
orcmd
is used, it will be normalized based on the client’s OS.Grammar (ABNF)
command ::= key / sequence / modifier-cmd key ::= valid-keyboard-key sequence ::= key 1*("-" key) modifier-cmd ::= modifier *("+" modifier) "+" key modifier ::= "ctrl" / "alt" / "meta" / "shift" / "cmd"
e.g.
d
,m
,c
,l-c
,c-r
,ctrl+c
,alt+1
,meta+t
,shift+a
,cmd+i
- actionConfigNamestring
The actionConfigName directs to the central configuration for a keyboard shortcut. An actionConfigName will set following attributes of this action to the global standard definitions: command, icon and text. Example value: granite/ui/shell/actions/edit The example will set for this action the attributes command, text and icon to the edit use case to the global default values under /conf/settings/granite/ui/shell/actions/edit. The global defaults could be changed under /conf/settings/granite/ui/shell/actions to other default values.
-
granite:AnchorButton