A small plugin that provides reusable Gutenberg blocks for TSC WordPress builds.
- Search Modal (
tsc/search-modal) - Search Form (
tsc/search-form)
Adds a search form presented in a modal, triggered by a header icon. The trigger can live inside sticky or absolutely positioned headers and the modal still displays over the page with an overlay.
Features:
- Retains current search terms between opens.
- Customizable modal background color.
- Customizable search button background and text colors.
- Upload a custom SVG file to replace the default search icon.
- Optional trigger text beside the icon.
- Front-end behavior opens the modal, focuses the input, and provides a dedicated close button.
A straightforward inline search form block for content areas, sidebars, or footers.
Features:
- Standard search field with submit button.
- Submits to the site search endpoint.
- Retains the user's current search terms.
- Customizable input/placeholder text color.
- Customizable submit button background and text colors.
In the plugin directory:
npm install
npm run startUse npm run start while developing blocks. Use npm run build before deploying or committing built assets.
For production sites, only runtime assets are required:
index.phpincludes/**build/blocks/**
Do not ship development-only files unless the site is intentionally being used for block development:
src/**node_modules/**- source maps
- dev configs
- The old custom accordion blocks were removed because accordion/details behavior is now available in WordPress core.
- This plugin should contain reusable block functionality, not one-off project experiments.
- Project-specific blocks should be promoted into this plugin only after they prove reusable across builds.
- WordPress 6.x
- Node 18+ for development