• Start
  • Blogg
  • Kom igång
  • Riktlinjer
  • Komponenter
  • Changelog
  • Tillgänglighet
  • Inställningar

Komponenter

Komponenter

​
​

Inga resultat hittade, prova med andra sökvillkor.

VMA

VMA

5.0.29

The VMA component is a surface that is anchored to the bottom edge of the screen.

Demo
Props
Installation
Länkar
Tillgänglighet
Change log
Statistik

Demo

Props

Se fullständing dokumentation(öppnas i ny flik)
NamnTypBeskrivning

background *

ColorThe background color variant of the component

children *

React.ReactNodeText content children

CloseButtonProps

{ ariaLabel: unknown; onClick: unknown }If this prop is provided, a Close button will be rendered with the specified props.

customAttribute

{ attribute: string; value: string | number }Used for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".

customTranslations

DeepPartialOverride default translations with custom text.

lang

"en" | "sv"Language used for internal translations.

onClick

() => voidAn option to provide an onClick handler to make the component behave as a button. If both RouterLink and onClick listener are present, the RouterLink is preferred

RouterLink

React.ReactElementAn option to provide a valid router link element to make the component linked. Use for example NavLink from "react-router-dom" or equivalent from another routing library. If both RouterLink and onClick listener are present, the RouterLink is preferred

Installation

Kodexempel
npm install @sj-ab/component-library.ui.vma

Länkar

  • Storybook

  • Figma

  • Bit.cloud

Tillgänglighet

  • Komponenten <VMA> är avsedd att omslutas av en <BottomBarContainer> och placeras inuti webbplatsens <header>-landmärke för att skapa rätt läsordning för skärmläsare.
  • Komponenten använder sig av live region-roller ("alert" eller "status") så att innehållet automatiskt läses upp av skärmläsare så snart det visas eller uppdateras. Live-regionerna har en inbyggd skärmläsaretikett "Viktiga meddelanden" som kan ändras med egenskapen customTranslations.
  • Använd propen href och RouterLink för att göra VMA till en länk.

Change log

  • Use inset focus indicator on VMA clickable area

    5.0.28

Statistik