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

Komponenter

Komponenter

​
​

Inga resultat hittade, prova med andra sökvillkor.

Title

Title

0.2.6

Title-komponenten är en atom som används flitigt i våra List- och Card-komponenter.

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

Demo

Props

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

alignItems

"start" | "end"The flex layout align items.

badge

ReactElementBadge to display in the title.

customAttribute

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

id

stringID for the title element.

isLoading

booleanIf true, a loading skeleton will be rendered instead of the component.

subtitle

ReactNodeSubtitle displayed below the title. A string is preferred, but React.ReactNode can be used for special cases, like combining text with icons.

title *

ReactNodeThe main title text. A string is preferred, but React.ReactNode can be used in special cases, such as combining text and icons.

titleComponent

ElementTypeChange the component of the Title element. Use this to separate styling from semantics, for instance if you need an H2 heading to look like an H3.

alignItems

"start" | "end"The flex layout align items.

badge

ReactElementBadge to display in the title.

customAttribute

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

id

stringID for the title element.

isLoading

booleanIf true, a loading skeleton will be rendered instead of the component.

subtitle

ReactNodeSubtitle displayed below the title. A string is preferred, but React.ReactNode can be used for special cases, like combining text with icons.

title *

ReactNodeThe main title text. A string is preferred, but React.ReactNode can be used in special cases, such as combining text and icons.

titleComponent

ElementTypeChange the component of the Title element. Use this to separate styling from semantics, for instance if you need an H2 heading to look like an H3.

Installation

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

Länkar

  • Storybook

  • Figma

  • Bit.cloud

Best practices

Tillgänglighet

Semantik

Title presenteras som ett eller flera textelement (paragraf eller rubrik).

Just nu går det inte att ändra den semantiska rubriknivån på Title. Detta är en känd brist som ska åtgärdas.

Change log

  • Major refactor of Accordion

    0.2.0
  • ErrorSummaryCard accessibility updates

    0.1.2
  • Upgrade to React 19

    0.1.0
  • Add margin props to Title component

    0.0.8

Statistik

  • Importer av Title

    17
  • Repos med Title

    9%
  • Senaste installerade version av Title

    0.2.6
  • Äldsta installerade version av Title

    0.2.5