Blocks / Template gallery

Template gallery

Templates to start from: search, categories, a blank entry, and a preview pane.

import { TemplateGallery, structureFilterTemplates } from "@forgeron/ui";
/01 → Default
Blank
Meeting notesTeam
RetrospectiveNewTeam
RoadmapProduct
Product specProduct
Onboarding planPeople
Pick one, press Enter or double click
API → Props
PropTypeDefaultDescription
templatesTemplateItem[]—{ id, name, description?, category?, keywords?, icon?, thumbnail?, preview?, badge? }. preview is what the pane shows.
category / defaultCategory / onCategoryChangestring | null—null is all of them.
query / defaultQuery / onQueryChangestring—The search.
selected / defaultSelected / onSelectedChangestring | null—The one pointed at; null is the blank entry.
blankboolean | { name?, description? }trueAn entry to start from nothing, first in the grid.
onChoose(id | null) => void—The button, Enter or a double click. null is blank.
chooseLabelstring"Use template"The button.
emptyReactNode—When the search finds nothing.
classNamestring—Extra classes.