@marcvintherdk/magazines-ui
v0.1.0
Published
React components and design tokens for the BN Magazines Design System, packaged for Figma Make kits.
Readme
@marcvintherdk/magazines-ui
React 18 components and design tokens for the BN Magazines Design System. The package is built so it can be used as a Figma Make kit.
Source of truth: BN Magazines Design System (Figma). It has 19 brands, light/dark modes and fluid sizing from 375 to 1440px.
What's inside
src/styles/tokens.css: generated from the Figma variables (brandandsizecollections plus every brand extension). Brand =[data-brand], dark =[data-theme="dark"], condensed =[data-condensed="true"]. Min/Max size modes became fluidclamp()values; layout widths switch at 1024px.src/components: Button/IconButton/ButtonGroup, Label/Tag/Chip/StatusLabel, form fields, Teaser/TeaserGrid, Header/Footer/Breadcrumbs/Pagination, Byline/ArticleToolbar/Factbox, Text, Icon.guidelines/: Make kit guidelines (Guidelines.mdis the entry point).demo/: playground with a brand and theme switcher (npm run dev, then open http://localhost:5188).
Scripts
npm run dev # playground
npm run build # dist/: index.js, index.d.ts, styles.css, tokens.css, fonts.css
npm run typecheckPublishing and creating the Make kit
- Pick the npm scope and registry. Private packages need a Figma Organization or Enterprise plan for Make to read them. Update
nameinpackage.json. - Run
npm run build, thennpm publish(add--access publicfor a public scoped package). - In Figma Make: new Make file → Settings → Create a kit → Assemble your kit → add the npm package. Optionally add the published BN Magazines library for its styles too.
- Copy the contents of
guidelines/into the kit'sguidelines/folder (replace the generatedGuidelines.md). - Test: prompt Make for e.g. "Front page for Illustreret Videnskab" or "Article page for Historie in dark mode", check that it drifts nowhere, then Publish kit.
Regenerating tokens
When variables change, run scripts/export-tokens.figma.js against the Figma file. Use the Figma MCP use_figma tool or a dev plugin, with PART set to 1, 2 and 3 in turn. Concatenate the three outputs into src/styles/tokens.css. Never edit tokens.css by hand.
Known gaps (v0.1)
- Logos: a text wordmark only. Brand SVG logos from the Figma
Logopage are not exported yet. - Icons: a small inline outline set, not the full Figma icon library.
- Not built yet: Article/Category heroes, audio and video players, recipe, product, table, calculator, hotspot, item collections, menu overlay, modals and banner ads.
- Commercial fonts (Solido, Wulkan Display, Atlas Grotesk, Helvetica LT Std) are not bundled.
