2022-02-19 08:04:25 +01:00
|
|
|
---
|
2021-10-17 18:26:00 +02:00
|
|
|
title: embed
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-12-28 21:07:45 +01:00
|
|
|
The `embed` setting controls the properties of the SVG document.
|
|
|
|
Set it to `true` to make SVG output suitable for embedding in a web page.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-12-28 21:07:45 +01:00
|
|
|
The default for `embed` is `false` which will include the `width` and `height`
|
|
|
|
attributes in the SVG tag, thereby making it suitable for printing.
|
|
|
|
|
|
|
|
When set to `true` the `width` and `height` attributes will not be added
|
2022-02-19 08:04:25 +01:00
|
|
|
which allows you to inject the SVG into an HTML document, where it will
|
2021-12-28 21:07:45 +01:00
|
|
|
responsively scale.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
2021-12-28 21:07:45 +01:00
|
|
|
import Brian from "@freesewing/brian";
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-12-28 21:07:45 +01:00
|
|
|
const pattern = new Brian({
|
2021-08-25 16:09:31 +02:00
|
|
|
embed: true
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
<Warning>
|
|
|
|
|
|
|
|
Do **not** use this for SVGs you want to print.
|
|
|
|
|
|
|
|
</Warning>
|