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 Introduzione Design Tokens Componenti Introduzione Base Informazioni Senso & scopo Community Assets Istruzioni Power-Apps Banner pubblicitari digitali SAP Icone delle app
Trova un componente

Lyne

Basics Animation

Animation

Border

Border

Grid

Grid

Spacings

Spacings

Typografie

Typografie

Components Action-Group

Action-Group

Alert

Alert

Alert-Group

Alert-Group

Autocomplete

Autocomplete

Button

Button

Calendar

Calendar

Card

Card

Card-Badge

Card-Badge

Checkbox

Checkbox

Checkbox-Group

Checkbox-Group

Chip

Chip

Clock

Clock

Datepicker

Datepicker

Dialog

Dialog

Divider

Divider

Footer

Footer

Form-Error

Form-Error

Form-Field

Form-Field

Header

Header

Header-Action

Header-Action

Icon

Icon

Image

Image

Journey-Header

Journey-Header

Link

Link

Link-List

Link-List

Logo

Logo

Menu

Menu

Menu-Action

Menu-Action

Radio-Button

Radio-Button

Radio-Button-Group

Radio-Button-Group

Selection-Panel

Selection-Panel

Signet

Signet

Slider

Slider

Tab-Group

Tab-Group

Tab Title

Tab Title

Tag

Tag

Tag-Group

Tag-Group

Teaser

Teaser

Teaser-Hero

Teaser-Hero

Time-Input

Time-Input

Title

Title

Toggle

Toggle

Toggle-Check

Toggle-Check

Tooltip

Tooltip

Tooltip-Trigger

Tooltip-Trigger

Questa pagina non è disponibile nella lingua desiderata. Lingue disponibili: Deutsch English

Slider Implementation

The sbb-slider is an input component that allows for the selection of a value within a range.

This can be set using the min and max properties (default values are 0 and 100),
while the initial value can be set using the value property (string), or the valueAsNumber (number).
If no value is provided, by default it is set halfway between the minimum and maximum.

<sbb-slider max="5" min="1"></sbb-slider>

<sbb-slider value="0"></sbb-slider>

In sbb-form-field

The component can be used within a sbb-form-field component.

<sbb-form-field label="Slider">
<sbb-slider value="0"></sbb-slider>
</sbb-form-field>

Slots

The component can optionally display two sbb-icons at either end;
consumers could set one/both of them using the startIcon and endIcon properties,
or can provide their own using the two slots named prefix and suffix.

<sbb-slider start-icon="circle-minus-small" end-icon="circle-plus-small"></sbb-slider>

<sbb-slider>
<sbb-icon slot="prefix" name="battery-level-empty-small"></sbb-icon>
<sbb-icon slot="suffix" name="battery-level-high-small"></sbb-icon>
</sbb-slider>

States

It is possible to display the component in disabled or readonly state by using the self-named properties.

<sbb-slider disabled></sbb-slider>

<sbb-slider readonly></sbb-slider>

Events

Consumers can listen to the native change event on the sbb-slider component to intercept the input's change event;
the current value can be read from event.target.value or event.target.valueAsNumber.

Keyboard interaction

The sbb-slider has the following behaviour on keypress when focused:

Key Action
Right arrow Increment the slider value by one (or one step).
Up arrow Increment the slider value by one (or one step).
Left arrow Decrement the slider value by one (or one step).
Down arrow Decrement the slider value by one (or one step).
Page up Increment the slider value by ten (or ten steps).
Page down Decrement the slider value by ten (or ten steps).
End Set the value to the maximum.
Home Set the value to the minimum.

Properties

Name Attribute Privacy Type Default Description
value value public string | undefined '' Value for the inner HTMLInputElement.
valueAsNumber value-as-number public number | undefined Numeric value for the inner HTMLInputElement.
name name public string | undefined '' Name of the inner HTMLInputElement.
form form public string | undefined The
element to associate the inner HTMLInputElement with.
min min public string | undefined '0' Minimum acceptable value for the inner HTMLInputElement.
max max public string | undefined '100' Maximum acceptable value for the inner HTMLInputElement.
readonly readonly public boolean | undefined false Readonly state for the inner HTMLInputElement. Since the input range does not allow this attribute, it will be merged with the disabled one.
disabled disabled public boolean | undefined false Disabled state for the inner HTMLInputElement.
startIcon start-icon public string | undefined Name of the icon at component's start, which will be forward to the nested sbb-icon.
endIcon end-icon public string | undefined Name of the icon at component's end, which will be forward to the nested sbb-icon.

Events

Name Type Description Inherited From
input InputEvent
didChange CustomEvent<void> Deprecated. used for React. Will probably be removed once React 19 is available.

Slots

Name Description
prefix Use this slot to render an icon on the left side of the input.
suffix Use this slot to render an icon on the right side of the input.
Demo
Read only Nein Ja Prefix Ja Nein Suffix Ja Nein Hintergrund White Milk Iron Charcoal Black Mehr Beispiele auf Storybook
Impressum Contatto Impostazioni dei cookie