0.1.0-rc.2

Feed

Feeds structure a stream of articles or activity items with consistent header, content, and action regions.

Try it

Shipped order #4821.

Usage

Use RuiFeedArticle for each item. Compose bylines, metadata, and actions with the dedicated sub-components.

import {
  RuiFeed,
  RuiFeedArticle,
  RuiFeedArticleHeader,
  RuiFeedArticleContent,
  RuiFeedByline,
} from '@ecopages/radiant-ui/feed';
 
<RuiFeed label="Activity">
  <RuiFeedArticle>
    <RuiFeedArticleHeader>
      <RuiFeedByline>Jane Cooper · 2 hours ago</RuiFeedByline>
    </RuiFeedArticleHeader>
    <RuiFeedArticleContent>Shipped order #4821.</RuiFeedArticleContent>
  </RuiFeedArticle>
</RuiFeed>

Consistent article structure

Keep header, content, and actions in the same order across items so users can scan the feed quickly.

Loading state

Set aria-busy on the feed while fetching new items so assistive technologies announce the update.

Theming

Feed maps to semantic surface and border roles, never Tailwind palette steps:

PartCSS roles
Article surface (rui-feed__article)surface-container-lowest, border, radius-container
Article hoverbackground, border, shadow-control
Meta / content / locationon-surface
Ratingon-background, primary
Meta separatorsborder
Focusfocus-ring
Geometry--space-* scale (inline gap, inset padding, stack gaps)

Override at the theme layer, not in component CSS.

API

RuiFeed and its article helpers are presentational JSX views, no custom element.

Props

ComponentPropTypeDefaultDescription
RuiFeedlabelstringAccessible name for the feed landmark.
RuiFeedaria-labelledbystringId of a visible heading that labels the feed.
RuiFeedaria-busybooleanAnnounce that more items are loading (APG).
RuiFeedArticleposinsetnumber1-based position in the feed.
RuiFeedArticlesetsizenumberTotal articles currently in the feed.
RuiFeedArticlelabelledBystringId(s) of the distinguishing label element(s).
RuiFeedArticledescribedBystringId(s) that summarize the article for skimming.
RuiFeedArticletabindexnumber0Make the article focusable (APG feed navigation).

CSS classes

Public BEM classes on the rendered elements (documented via @cssclass):

ClassDescription
.rui-feedFeed region (role="feed").
.rui-feed__articleArticle card surface.
.rui-feed__headerArticle header stack.
.rui-feed__bylineAvatar + identity row.
.rui-feed__byline-bodyIdentity text stack.
.rui-feed__metaMetadata row.
.rui-feed__contentArticle body column.
.rui-feed__actionsAction row under a top border.

Theme roles

PartCSS variables consumed
Article surface--surface-container-lowest, --border, --radius-container
Article hover--background, --border, --shadow-control
Meta / content / location--on-surface
Rating--on-background, --primary
Meta separators--border
Focus--focus-ring
Geometry--space-inline, --space-inset, --space-2--space-6

Accessibility

  • Label the feed region with the label prop or an external heading.
  • Each article should have a discernible title or summary in the header.
  • Action buttons inside articles need descriptive labels, not just icons.