Honeycomb

HivePostList

Post feed with sorting, pagination, pinned posts, and multiple layout variants. Supports global ranked posts, community feeds, and tag filtering.

Uses bridge.get_ranked_posts

Fetches posts from the Hive blockchain via the Bridge API. Use the tag prop to filter by community (e.g. hive-167922) or by tag (e.g. photography). Without a tag, returns global ranked posts. Requires HiveProvider wrapper.

Usage

import { HivePostList } from "@hiveio/honeycomb-solid";

function TrendingFeed() {
  return <HivePostList sort="trending" limit={10} />;
}

Preview

Pinned

Welcome to Hive - Getting Started Guide

@hiveio

312 87$124.50

Building DApps on Hive Blockchain

@barddev

89 24$15.30

Weekly Development Update #42

@hivebuzz

156 45$32.10

Understanding Resource Credits

@peakd

67 12$8.75
Page 1

Props

PropTypeDefaultDescription
sort"trending" | "hot" | "created" | "payout" | "muted""trending"Sort order for the post feed
tagstring-Community name (hive-167922) or tag (photography). Omit for global feed.
limitnumber20Posts per page
pinned_postsArray<{ author: string; permlink: string }>[]Posts pinned at the top of the list
show_sort_controlsbooleanfalseShow sort buttons above the list
variant"card" | "compact" | "grid""compact"Layout variant for post items
hide("author" | "thumbnail" | "payout" | "votes" | "comments" | "time")[][]Elements to hide from post cards
linkTargetstring"https://blog.openhive.network"Base URL for post links
classstring-Additional CSS classes

useHivePostList Hook

For full control over the post feed, use the useHivePostList hook directly. It returns posts, loading state, pagination controls, and sort management.

Return values

PropertyTypeDescription
postsRankedPost[]Current page of ranked posts
is_loadingbooleanWhether data is being fetched
errorError | nullFetch error, if any
sortSortTypeCurrent sort method
set_sort(sort: SortType) => voidChange sort method (resets to page 1)
pagenumberCurrent page number
has_prev / has_nextbooleanWhether previous/next page exists
prev_page / next_page() => voidNavigate to previous/next page

Example

import { useHivePostList } from "@hiveio/honeycomb-solid";
import { For, Show } from "solid-js";

function CustomFeed() {
  const feed = useHivePostList({ sort: "trending", tag: "hive", limit: 10 });

  return (
    <Show when={!feed.is_loading} fallback={<p>Loading...</p>}>
      <div>
        <div class="flex gap-2 mb-4">
          <For each={["trending", "hot", "created"]}>
            {(s) => (
              <button
                onClick={() => feed.set_sort(s)}
                classList={{ "font-bold": feed.sort === s }}
              >
                {s}
              </button>
            )}
          </For>
        </div>

        <For each={feed.posts}>
          {(post) => (
            <article>
              <h3>{post.title}</h3>
              <p>by @{post.author} - {post.payout_value}</p>
            </article>
          )}
        </For>

        <div class="flex gap-2 mt-4">
          <button onClick={feed.prev_page} disabled={!feed.has_prev}>Previous</button>
          <span>Page {feed.page}</span>
          <button onClick={feed.next_page} disabled={!feed.has_next}>Next</button>
        </div>
      </div>
    </Show>
  );
}

Examples

Community posts

Pass a community name (format hive-NNNNNN) as the tag prop to show posts from that community.

import { HivePostList } from "@hiveio/honeycomb-solid";

// Show posts from a specific community
function LeoFinanceFeed() {
  return (
    <HivePostList
      tag="hive-167922"
      sort="trending"
      show_sort_controls
      limit={10}
    />
  );
}

Tag filter

Pass any Hive tag to filter posts. Works with all sort options.

import { HivePostList } from "@hiveio/honeycomb-solid";

// Filter posts by a specific tag
function PhotographyFeed() {
  return (
    <HivePostList
      tag="photography"
      sort="created"
      limit={10}
    />
  );
}

Sort controls

import { HivePostList } from "@hiveio/honeycomb-solid";

// Show sort buttons (trending, hot, created, payout, muted)
function FeedWithControls() {
  return (
    <HivePostList
      sort="trending"
      tag="hive"
      show_sort_controls
    />
  );
}

Pinned posts

import { HivePostList } from "@hiveio/honeycomb-solid";

// Pin specific posts to the top of the list
function FeedWithPinned() {
  return (
    <HivePostList
      sort="created"
      pinned_posts={[
        { author: "hiveio", permlink: "welcome-to-hive" },
        { author: "barddev", permlink: "hive-ui-announcement" },
      ]}
    />
  );
}

Variants

// Compact (default) - single-line rows
<HivePostList sort="trending" variant="compact" />

// Card - full post cards with body preview
<HivePostList sort="trending" variant="card" />

// Grid - responsive image grid
<HivePostList sort="trending" variant="grid" />

Hide elements

// Hide specific elements from post items
<HivePostList
  sort="trending"
  hide={["thumbnail", "payout", "time"]}
/>

// Available: "author" | "thumbnail" | "payout" | "votes" | "comments" | "time"
Post CardContent Renderer