Skip to content
portalbits
Home Docs GitHub(opens in a new tab)

Guides

Get startedFoundationsMotion

Components

All components

Buttons

ButtonIconButton

Inputs

InputSelectTextareaSlider

Selection

CheckboxToggleToggleGroupSwitchRadioGroup

Identity

AvatarBadge

Overlays

DialogPopoverTooltipDropdownMenuAlertDialog

Disclosure

TabsAccordion

Cards

AppCardArticleCardFeatureCard

Content

CarouselSectionHeaderEmptyStateAlertProgressSeparatorRowListRow

Chrome

PortalShellSidebarNavMobileNavTopBarAuthFrameColorSelectorFloatingNav

RowList

A list of records. Each row supplies its own cells.

  • Field notes Draft
  • A single cell can explain this record.
Variations

Source

<script lang="ts">
  import 'portal-bits/styles.css';
  import 'portal-bits/tokens.css';
  import type { Snippet } from 'svelte';

  let { children }: { children: Snippet } = $props();
</script>

{@render children()}
<script lang="ts">
  import RowListExample from './RowListExample.svelte';
</script>

<RowListExample content={"short"} />
<script lang="ts">
  import { Badge, Button, Row, RowList } from 'portal-bits';
  let { content = 'short' }: { content?: 'short' | 'wrapping' } = $props();
  let saved = $state(false);
</script>

<RowList aria-label="Example records">
  {#if content === 'short'}
    <Row>
      <a href="#field-notes">Field notes</a>
      <Badge>Draft</Badge>
      <Button variant="quiet" onclick={() => (saved = !saved)}>{saved ? 'Saved' : 'Save'}</Button>
    </Row>
  {:else}
    <Row>
      <span>A longer synthetic record wraps naturally when the available space is narrow.</span>
      <Badge>Draft</Badge>
    </Row>
  {/if}
  <Row><span>A single cell can explain this record.</span></Row>
</RowList>

API reference

These tables list the props and snippets that RowList declares. Attributes passed through to an element or primitive are listed under Forwarded attributes, not here.

Props

NameTypeDefaultRequiredBindingDescription
classstring""NoOne-wayExtra classes, added after the component classes.

Snippets

NameTypeDefaultRequiredBindingDescription
childrenSnippetNoneNoOne-wayThe rows. Place Row elements here.

Forwarded attributes

  • Native `ul` attributes: `id`, `aria-label`, `aria-labelledby`, `data-*`, and handlers.

No data attributes are documented as stable.

Limits

  • Rows do not imply navigation or selection. Sorting, pagination, and column headers stay with you.
  • The wrapping layout is an adaptation.

Related

  • Row
Previous Separator Next Row

On this page

  • Preview
  • Source
  • API reference
  • Props
  • Snippets
  • Forwarded attributes
  • Limits