Fine-tune Card

The agent adjusts design properties in an inspector.

Installation

pnpm dlx shadcn@latest add @ward/fine-tune-card

Add the Ward registry to components.json once:

"registries": {
  "@ward": "https://ward.so/r/{name}.json"
}

Or install from the URL with no configuration: npx shadcn@latest add https://ward.so/r/fine-tune-card.json

Usage

import FineTuneCard from "@/components/ward/FineTuneCard";
<FineTuneCard
  fields={[
    { key: "width", label: "W", value: 324, min: 40, max: 999 },
    { key: "height", label: "H", value: 96, min: 24, max: 999 },
  ]}
  options={["Seasonal", "Classic", "Limited"]}
  labels={{ title: "Project card" }}
  onChange={(state) => console.log(state.values)}
/>

Props

PropTypeDefaultDescription
variantstring"Default"Accepted so the Ward preview can pass a variant; the card has a single look and ignores it.
fieldsFineTuneField[]FIELDSNumber properties shown in pairs in the layout grid, which can be dragged, nudged with the arrow keys or typed; defaults to width, height, radius and opacity.
optionsstring[]["Seasonal", "Classic", "Limited"]Choices offered in the Type menu.
labelsPartial<FineTuneCardLabels>-Copy for the title, section headings, menu placeholder and status text, merged over the built-in strings.
onChange(state: FineTuneState) => void-Called with the selected layout, field values and type whenever the user edits the card.

Ward · Version 1.1.0 · Registry manifest