Zur Navigation Zum Inhalt Kontakt Menu Trouver un composant Aperçu Lyne Principes Bases Accessibilité Système de design Guidelines Deutsch Français Italiano English Nos principes de design Centré sur l’utilisateur Reconnaissable Inclusif Minimaliste Holistique Auto-explicatif Axé sur les tâches Approprié Portail de la marque CFF Logo Horloge numérique Droits d’utilisation Couleurs de base Couleurs fonctionnelles Couleurs off-brand Icônes Icônes de l’horaire Pictogrammes À propos de l’accessibilité À propos de ce guide Contact Informations complémentaires Product Owner User Research Interaction Design Visual Design Development Content Design Testing What is a design system? Conception Développer FAQ Aide Procès Contribution Contact Aperçu Base Composants Overview Releases Design Tokens Komponenten Aperçu Base Informations Aperçu Base Composants Sens & objectif Community Assets Instructions Power-Apps Bandeaux publicitaires numériques SAP Icônes d’applications Cette page n'est pas disponible dans la langue souhaitée. Langues disponibles Deutsch English Card-Button Info

Was macht die Komponente?

Sie ist Teil der Card-Komponente.

Wann soll die Komponente eingesetzt werden?

  • Nur innerhalb der Card-Komponente.

Übergeordnete Komponenten

Card
Anatomie
Anatomie der Komponente
Nummer Typ Beschreibung Optional Hinweis
1 Slot Beliebiger Inhalt erlaubt Nein
2 Komponente sbb-card-badge Ja
Implementation

The sbb-card-button is the component used to turn a sbb-card into a button.

<sbb-card-button type="submit" form="buy" value="trip">Buy this trip!</sbb-card-button>

Button properties

The component is internally rendered as a button,
accepting its associated properties (type, name, value and form).

Accessibility

It's important that a descriptive message is being slotted into the unnamed slot of sbb-card-button
as it is used for search engines and screen-reader users.

<sbb-card-button>Buy a half-fare ticket now</sbb-card-button>

Properties

Name Attribute Privacy Type Default Description
active active public boolean false Whether the card is active.
form form public string | undefined The
element to associate the button with.
name name public string The name of the button element.
type type public SbbButtonType 'button' The type attribute to use for the button.
value value public string The value of the button element.

Slots

Name Description
Use the unnamed slot to add a descriptive label / title of the button (important!). This is relevant for SEO and screen readers.
Impressum Contact Paramètres des cookies