Source List

Zatytułowana lista źródeł w postaci chipów lub wierszy, z przełącznikiem „pokaż więcej”. Albo zwinięte w jeden chip z nałożonymi znakami i liczbą, który otwiera listę.

Dostępny w
  • Angular: dostępny
  • Vue: dostępny
  • React: dostępny
  • React Native: jeszcze niedostępny

Użycie

Sources
Harbour Lane kickoff · Mar 3Pricing review · Mar 5Team retro · Mar 9
Sources5
  • Harbour Lane kickoffMar 3
  • Pricing reviewMar 5
  • Team retroMar 9

Import

ts
import {
  SoneSourceListComponent,
  SoneSourceListItemDirective,
  SoneSourceListTriggerComponent,
} from "@surface-one/angular/source-list";

Dokumentacja API

SoneSourceListComponentKomponent

Selektor
sone-source-list
Wejścia
NazwaTyp Domyślnie
itemsreadonly T[][]
trackBywymagane(item: T) => string—
variantSourceListVariant"row"
sizeSourceListSize"default"
labelstring""
ariaLabelstring | nullnull
showCountbooleanfalse
limitnumber | nullnull
columns1 | 21
listboolean | nullnull

SoneSourceListItemDirectiveDyrektywa

Selektor
ng-template[soneSourceListItem]
Wejścia
NazwaTyp Domyślnie
soneSourceListItemOfreadonly T[] | null | undefinedundefined

SoneSourceListTriggerComponentKomponent

`button[soneSourceListTrigger]` — the sources behind an answer folded into one small chip: up to three stacked marks (projected: favicons, `<sone-avatar>`s, marks) and a count (“6 sources”). It is a plain button: open the full `<sone-source-list>` from it (a popover, a sheet or a disclosure) and wire `aria-expanded` / `aria-controls` for what it opens.

Selektor
button[soneSourceListTrigger]
Wejścia
NazwaTyp Domyślnie
count

How many sources there are (the count on the chip).

number0