Madegrain
DeutschDE Open the appOpen app

Fabric needed,
size by size.

A free widget for your pattern: your customers pick their size and fabric width and see right away how much fabric to buy.

Free, with two small links under the widget · no sign-up · no cookies

View
Theme

A real widget for the free Charlie Chinos pattern from FreeSewing, with a 10% margin.

Code
<div class="patternnest-widget" data-pn-widget="YOUR-ID" data-pn-title="Fabric needed: Your pattern" data-pn-h="674" style="max-width:720px"><p style="display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 16px;margin:0;padding:12px 0;font-size:14px;line-height:20px;text-transform:none;letter-spacing:normal"><a href="https://madegrain.com/patternnest/fabric-yardage/your-label/your-pattern/" style="color:inherit;text-decoration:underline;text-underline-offset:3px">Your pattern: all sizes and fabric widths</a><a href="https://madegrain.com/patternnest/?src=widget" style="margin-left:auto;color:inherit;text-decoration:underline;text-underline-offset:3px">Powered by PatternNest</a></p></div>
<script src="https://madegrain.com/w/embed.js" async></script>
This is what the code looks like. You get your own in the app.

On your site in three steps

  1. 1

    Set up the sizes

    Open your pattern file in PatternNest and add each size once. The file stays on your device.

  2. 2

    Let it calculate

    PatternNest works out the cutting plans for every size on the usual fabric widths, folded and single layer, with and without a direction.

  3. 3

    Paste the code

    Copy the code and paste it on your site. You can change or delete the widget at any time.

Create widget

What your customers see

Their size, their fabric width

Pick size and width, and the figure is there. In metres or yards, rounded up to 10 cm or an eighth of a yard.

Folded or single layer

Anyone cutting single layer with a projector sees the figure for that. Folded is the default.

Direction and shrinkage

A one-way print or nap and shrinkage when prewashing can be added.

Where the figure comes from

Under every figure it says that it comes from a PatternNest cutting plan and how much margin you add.

Fits your site

Light, dark or automatic, in your accent colour, from 280 to 720 pixels wide.

A page of its own

Your pattern also gets a page on madegrain.com with the fabric needed for every size and width, your label name and a link to the pattern in your shop. The first link under the widget leads there.

Shops that sell your pattern

If you allow it, that page offers the code to fabric shops that sell your pattern. They show the same widget, with your links.

How to add it

Almost everywhere you use the code with script. Where a site removes scripts, use the code without script.

Shopify

Open the product in Shopify. In the description, click “Show HTML” (the <> icon), paste the code without script and save. Shopify doesn't run scripts in descriptions reliably, so use the version without script.

WooCommerce and WordPress

In the block editor, add a “Custom HTML” block and paste the code with script. In the classic editor, use the “Code” tab. WordPress keeps the code only for administrators and editors: with the role author or contributor it removes both versions when you save, so ask an administrator to add it.

Squarespace

Add a “Code” block where you want it and paste the code with script. Squarespace runs code with a script or an iframe only on the Core, Plus and Advanced plans. On Basic, link to your widget instead: the address after src= in the code without script.

Wix

Click “Add Elements”, then “Embed Code”, “Popular Embeds” and “Embed HTML”. Click “Enter Code”, paste the code without script and click “Apply”. Make the element about 40 pixels taller than the height in the code, so the link below the widget shows too.

Payhip

Payhip descriptions have no HTML view. On your own Payhip store pages with your own domain, add the code with script under “Add section” and “Embed Code”. Otherwise show the widget on your own site and link to it from the description.

Your own site

Paste the code with script into your HTML where the widget should appear. The script sets the height and checks the two links under the widget.

Etsy

Etsy doesn't allow embedded code in listings, so the widget can't go there. Show it on your own site. If you mention that site in your Etsy shop, do it as fabric information, not as a way to buy elsewhere.

Questions

What does the widget cost?

Nothing. It's free as long as the two links under it stay: one to the page of your pattern on madegrain.com, one to PatternNest.

Do my customers need PatternNest?

No. The widget only shows figures, with no sign-up and no app.

What is stored?

Only what the widget and the page of your pattern show: the pattern name, your label name, the link to the pattern in your shop, the garment, sizes, fabric names, your title and note, the margin and the figures. Your pattern file never leaves your device. On top of that there's a count of how often the widget was loaded.

How accurate are the figures?

Every figure comes from a cutting plan PatternNest worked out for exactly that size, fabric width and cutting option. Your margin is added and the result is rounded up. If you lay the pieces out differently by hand, you may need more, which is what the margin is for.

Can I change or delete it?

Yes, at any time with your secret edit link. Use it to change texts, appearance, margin and sizes, or to delete the widget. Its page on madegrain.com goes with it. We can't recover the link, so keep it safe.

Does the widget set cookies?

No. It sets no cookies, stores nothing in your customers' browsers and collects no personal data. The counter only counts views. As with any page, the IP address is transmitted when it loads; we don't store it.

Privacy policy

Will it fit my site?

It takes the width it gets, from 280 to 720 pixels, comes light, dark or automatic and can use your accent colour. If that colour is too light or too dark, the widget adjusts it so everything stays readable.

Show the fabric needed right where your pattern is.

Work it out once, paste the code, and every visitor sees their figure.

Create widget
The PatternNest tailorbird, made of cream felt with green wings and a rust red cap
Our bird is a tailorbird. In nature it stitches leaves together to build its nest.