npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@universityofmaryland/web-feeds-library

v1.2.3

Published

UMD Feed Elements

Downloads

855

Readme

University of Maryland Feeds Library

Feeds Version

Dynamic content feed components for displaying University of Maryland news, events, and academic information with automatic updates, caching, and brand-compliant styling.

Overview

The UMD Feeds Library simplifies the integration of dynamic UMD content into any web application. It provides pre-built components for displaying news articles, event calendars, and academic program information that automatically sync with UMD data sources. Built on the Elements Library and styled with the Styles Library, these components ensure consistent presentation while handling all complexities of data fetching, caching, error handling, and responsive layouts.

Installation

# Using npm
npm install @universityofmaryland/web-feeds-library

# Using yarn
yarn add @universityofmaryland/web-feeds-library

Peer Dependencies

For complete styling and functionality:

npm install @universityofmaryland/web-styles-library
npm install @universityofmaryland/web-elements-library

Quick Start

import { news, events } from '@universityofmaryland/web-feeds-library';

// Create a news grid
const newsGrid = news.grid({
  token: 'your-api-token',
  numberOfColumnsToShow: 3,
  isThemeDark: false,
});

// Add to your page
document.querySelector('.news-container').appendChild(newsGrid.element);

Feed Types

News Feeds

Display UMD news articles in various layouts:

import { news } from '@universityofmaryland/web-feeds-library';

// Grid layout - Responsive card grid
const newsGrid = news.grid({
  token: 'your-api-token',
  numberOfColumnsToShow: 3,
  isThemeDark: false,
  isTransparent: false,
});

// List layout - Vertical article list
const newsList = news.list({
  token: 'your-api-token',
});

// Featured layout - Hero article with sidebar
const newsFeatured = news.featured({
  token: 'your-api-token',
  isLazyLoad: true,
  isLayoutReversed: false,
});

Event Feeds

Display UMD events with calendar integration:

import { events } from '@universityofmaryland/web-feeds-library';

// Grid layout - Event cards
const eventsGrid = events.grid({
  token: 'your-api-token',
  numberOfColumnsToShow: 3,
});

// List layout - Chronological list
const eventsList = events.list({
  token: 'your-api-token',
});

// Slider - Horizontal scroll
const eventsSlider = events.slider({
  token: 'your-api-token',
});

Academic Feeds

Display academic programs and information:

import { academic } from '@universityofmaryland/web-feeds-library';

// Academic event slider
const academicSlider = academic.slider({
  token: 'your-api-token',
  department: 'engineering',
  programType: 'graduate',
});

Integration with Other Packages

Styles Package Integration

Feeds automatically use UMD styles for consistent appearance:

<!-- Feeds inherit grid and spacing utilities -->
<div class="umd-layout-space-vertical-landing">
  <div id="news-feed"></div>
</div>

Elements Package Usage

Feeds are built using Elements for rendering:

  • Card elements for item display
  • Grid layouts from layout elements
  • Typography from text elements

Components Package Compatibility

Feeds can be wrapped in web components:

import { Components } from '@universityofmaryland/web-components-library';
import { news } from '@universityofmaryland/web-feeds-library';

// Initialize feed component wrapper
Components.feed.newsList();
// Feed will render inside the component

Configuration Options

Common Properties

All feeds accept these base properties:

interface BaseFeedProps {
  token: string; // Required: API authentication token
  isThemeDark?: boolean; // Dark theme styling
  isTransparent?: boolean; // Transparent card backgrounds
}

Layout-Specific Options

Grid Layout:

interface GridProps extends BaseFeedProps {
  numberOfColumnsToShow?: number; // 1-4, default: 3
}

Featured Layout:

interface FeaturedProps extends BaseFeedProps {
  isLazyLoad?: boolean;
  isLayoutReversed?: boolean;
}

Event Handling

import { events } from '@universityofmaryland/web-feeds-library';

const eventsFeed = events.list({
  token: 'your-api-token',
  onLoad: (items) => {
    console.log(`Loaded ${items.length} events`);
  },
  onError: (error) => {
    console.error('Feed error:', error);
    // Show fallback content
  },
  onItemClick: (item) => {
    // Custom click handler
    console.log('Clicked:', item.title);
  },
});

// Listen for feed updates
eventsFeed.element.addEventListener('feed:update', (e) => {
  console.log('Feed updated with new items');
});

Performance Features

Lazy Loading

Load content as users scroll:

const lazyFeed = news.featured({
  token: 'your-api-token',
  isLazyLoad: true,
});

TypeScript Support

Full TypeScript definitions included:

import type {
  NewsFeedProps,
  EventsFeedProps,
  FeedItem,
  FeedEvents,
} from '@universityofmaryland/web-feeds-library';

const newsProps: NewsFeedProps = {
  token: 'token',
  numberOfColumnsToShow: 3,
  isThemeDark: false,
};

Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

Accessibility

All feed components are WCAG 2.1 AA compliant:

  • Semantic HTML markup
  • ARIA live regions for updates
  • Keyboard navigation
  • Screen reader announcements
  • Skip links for long lists

Documentation

Testing

# Run tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

Contributing

See the main repository for contribution guidelines.

License

University of Maryland