Ballmac UI home

Secrets 1: secrets inventory

An inventory of secrets that never shows a value: name, environment, owner, what reads it, when it was last read and how long since it changed, old ones called out in words, search, filters and Rotate behind a confirmation.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/secrets-1

Usage

Example: secrets-1-demo.tsx
"use client"

import { Secrets1 } from "@/components/ballmac/blocks/secrets-1/secrets-1"

export default function Secrets1Demo() {
  return <Secrets1 onRotate={() => new Promise((r) => setTimeout(r, 500))} />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton rows under the real heading, announced as loading.

    state="loading"
  • No secrets yet

    Says no secrets yet; emptyState sets the copy. A search or filter with no match says so.

    state="empty"
  • Could not load

    An alert saying nothing was rotated or changed, with Try again (onRetry). A rotation that fails leaves the secret as it was and says why.

    state="error"

Dependencies

Use with AI

A secrets inventory. <Secrets1 secrets={[{ id, name: 'STRIPE_SECRET_KEY', environment: 'production' | 'staging' | 'development', owner, rotatedDays, lastUsed, usedBy? }]} maxAgeDays={90} onRotate={(secret) => Promise} />. It never takes or shows a secret value. A secret not changed for maxAgeDays or more is called out in words; Rotate opens a confirmation that says what happens, then shows the secret as changed today. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Secrets 1: secrets inventory (@ballmac/secrets-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • A security or platform page listing every credential and its age
  • A rotation checklist for a compliance review

Not for

  • Editing or revealing values; this is deliberately read-only
  • API keys for your own users; use api-key-field

Registry JSON: https://ui.ballmac.com/r/secrets-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.