
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@templatical/media-library
Advanced tools
Media library for Templatical — composable, Vue components, and a standalone visual SDK.
Browse, upload, organize, crop, and replace media assets. Used by @templatical/editor's Cloud build, and available as a standalone SDK for any app that needs a media manager.
npm install @templatical/media-library
Peer deps: vue@^3.5, tailwindcss@^4.
Authentication. The media library connects to Templatical Cloud and authenticates against your backend. Your server exposes a token endpoint (returning a short-lived JWT for the current user/project), and you pass that endpoint URL as
auth.url. See the authentication guide for the full setup.
import { init } from '@templatical/media-library';
import '@templatical/media-library/style.css';
const media = await init({
container: '#media',
auth: {
url: 'https://your-app.com/api/templatical/token',
},
onSelect(item) {
console.log('Picked:', item.url);
},
});
// Later
media.unmount();
Use MediaLibraryModal inside a Vue 3 app. See docs for the full prop reference.
import { MediaLibraryModal } from '@templatical/media-library';
import '@templatical/media-library/style.css';
import { AuthManager } from '@templatical/core/cloud';
import { useMediaLibrary } from '@templatical/media-library';
const authManager = new AuthManager({
url: 'https://your-app.com/api/templatical/token',
});
await authManager.initialize();
const lib = useMediaLibrary({
projectId: authManager.projectId,
authManager,
});
import { AuthManager } from '@templatical/core/cloud';
import { MediaApiClient } from '@templatical/media-library';
const api = new MediaApiClient(authManager);
const response = await api.browseMedia({ folder_id: null });
init(), unmount()MediaLibraryModal + 12 sub-components (grid, upload zone, folder tree, preview panel, edit/replace/import modals)useMediaLibrary, useMediaCategories, useMediaPicker, useI18nMediaApiClientMediaItem, MediaFolder, MediaCategory, MediaConversion, MediaBrowseParams/Response, MediaUsageInfo/Response, MediaConfig, etc.When the editor mounts in its default shadow-DOM mode (shadowDom: true), the media library invocation teleports into the editor's shadow-aware popover root rather than document.body. The MediaLibraryModal accepts an optional popoverTarget?: HTMLElement | null prop and provides it to its three nested sub-modals (replace, edit, import-url) so the entire media UI lives inside the editor's shadow root. Standalone-SDK consumers (init({ container })) keep the previous body-level mount.
If you embed MediaLibraryModal manually inside another shadow-DOM-mounted UI, pass popoverTarget to keep its sub-modals scoped to your shadow root.
Full reference at docs.templatical.com.
FSL-1.1-MIT — free for any non-competing commercial use, automatically converts to MIT after 2 years per release.
FAQs
Media library management for Templatical email editor
The npm package @templatical/media-library receives a total of 3,617 weekly downloads. As such, @templatical/media-library popularity was classified as popular.
We found that @templatical/media-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.