Zur Navigation Zum Inhalt Kontakt Menu Trova un componente Descrizione generale Lyne Principi Base Accessibilité Sistema di design Guidelines Deutsch Français Italiano English I nostri principi di design Soluzioni focalizzate sull’utente Riconoscibilità Inclusione Riduzione Olistico Autoesplicativo Orientamento all’attività Adeguatezza Portale della marca FFS Logo Orologio digitale Diritti di utilizzazione Colori die base Colori funzionali Colori Off Brand Icone Icone dell'orario Pittogrammi Informazioni sull’accessibilità Über diesen Guide Contatti Letture consigliate Product Owner User Research Interaction Design Visual Design Development Content Design Testing What is a design system? Designing Coding FAQ Aiuto Processo Contribution Contatto Introduzione Base Componenti Introduzione Base Componenti Introduzione Base Componenti Overview Releases Design Tokens Komponenten Introduzione Base Informazioni Senso & scopo Community Assets Istruzioni Power-Apps Banner pubblicitari digitali SAP Icone delle app Questa pagina non è disponibile nella lingua desiderata. Lingue disponibili Deutsch English Primary Button (Static) Implementation

The sbb-button-static component mimics the look of the <sbb-button>,
and it's meant to be used whenever is required to nest one button inside another without breaking the HTML functionality.

<sbb-button-static>Fake button</sbb-button-static>

Slots

The button text is provided via an unnamed slot; the component can optionally display a sbb-icon
at the component start using the iconName property or via custom content using the icon slot.
At least one is mandatory, so you can have a sbb-button-static with icon only, text only, or with both.

<sbb-button-static icon-name="info"> Button text </sbb-button-static>

<sbb-button-static>
  <sbb-icon slot="icon" name="info"></sbb-icon>
  Button text
</sbb-button-static>

<sbb-button-static icon-name="info" aria-label="Click for more information."></sbb-button-static>

Style

The component has a negative variant which can be set using the negative property.

There are two different sizes (m and l, which is the default) that can be set using the size property.

The component can be displayed in disabled state using the self-named property.

<sbb-button-static negative>Button</sbb-button-static>

<sbb-button-static size="m">Button</sbb-button-static>

<sbb-button-static disabled>Button</sbb-button-static>

Focus outline

Please make sure that the focus outline appears in the correct color if the component is used on a dark background.
You can set it by re-defining the css var on sbb-button-static or any parent element:

sbb-button-static {
  --sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);
}

Accessibility

Use the accessibility properties in case of an icon-only button to describe the purpose of the sbb-button-static for screen-reader users.

Properties

Name Attribute Privacy Type Default Description
size size public SbbButtonSize | undefined 'l' Size variant, either l or m.
negative negative public boolean false Negative coloring variant flag.
iconName icon-name public string | undefined The icon name we want to use, choose from the small icon variants from the ui-icons category from here https://icons.app.sbb.ch.
disabled disabled public boolean false Whether the component is disabled.

Slots

Name Description
Use the unnamed slot to add content to the button-static.
icon Slot used to display the icon, if one is set
Beispiele
Default
Negative
Disabled
Negative Disabled
Icon Only
Icon Only Negative
Icon Only Disabled
No Icon
Size M
Size S
Fixed Width
With Slotted Icon
Loading Indicator
With Hidden Slotted Icon
HTML-Markup kopiert.
Playground
Label
Grössen M L Icon Ja Nein Label Ja Nein Negativ Nein Ja Hintergrund White Milk Iron Charcoal Black
Trova un componente

Lyne

Impressum Contatto Impostazioni dei cookie