Phi
Resource List
@dicehub/phiv1.0.0-beta.1

Resource List

A layout block for resource list pages with optional sidebar content.

<ResourceListPage
  title="KV Namespaces"
  description="Store key-value data globally with low-latency access"
>
  <template #icon>
    <DatabaseIcon />
  </template>
  <template #usage>...</template>
  <template #additionalContent>...</template>

  <ResourceList />
</ResourceListPage>

Installation

ResourceListPage is a source block: the Phi CLI copies its source into your app so you own and can customize the code.

pnpm dlx @dicehub/phi@beta add ResourceListPage

The command writes the block into the blocksDir from your phi.json, for examplesrc/components/phi/resource-list-page/ResourceListPage.vue. Import it from there:

import ResourceListPage from "./components/phi/resource-list-page/ResourceListPage.vue";

Run pnpm dlx @dicehub/phi@beta init once before the first block. See the CLI reference for every command.

Why blocks? Blocks give you full ownership of the code, allowing you to customize layouts to fit page-specific needs.

Usage

<script setup lang="ts">
import ResourceListPage from "./components/phi/resource-list-page/ResourceListPage.vue";
</script>

<template>
  <ResourceListPage
    title="Databases"
    description="Manage your database instances and configurations"
  >
    <template #icon>
      <DatabaseIcon />
    </template>

    <section>
      Your resource list content
    </section>
  </ResourceListPage>
</template>

Examples

Basic

A minimal resource list page with title, description, and icon.

<ResourceListPage
  title="Databases"
  description="Manage your database instances and configurations"
>
  <template #icon>
    <DatabaseIcon />
  </template>

  <ResourceList />
</ResourceListPage>

Minimal

Without a title, description, or icon the heading block is omitted and the page renders the list alone.

<ResourceListPage>
  <ResourceList />
</ResourceListPage>

With Usage Sidebar

Include a sidebar with usage examples or quick start guides.

<ResourceListPage
  title="API Keys"
  description="Create and manage API keys for your applications"
>
  <template #usage>
    <QuickStartCard />
  </template>

  <ResourceList />
</ResourceListPage>

API Reference

PropertyTypeDescription
titlestringPage title displayed at the top.
descriptionstringPage description below the title.
iconslotIcon displayed next to the title.
usageslotSidebar content for usage examples or quick start guides.
additionalContentslotAdditional sidebar content such as resources or links.
default slotslotMain content area for the resource list. Rendered before the sidebar in the DOM.
classstringAdditional class for the root element.