
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus setup. It's part of my efforts to simplify FreeSewing's setup so we can focus on our core value proposition.
30 lines
596 B
Text
30 lines
596 B
Text
---
|
|
title: idPrefix
|
|
---
|
|
|
|
The `idPrefix` setting allows you to specify a prefix that will be used
|
|
for all IDs in the SVG output. Its default value is `fs-`.
|
|
|
|
## Signature
|
|
|
|
```js
|
|
const settings = {
|
|
String idPrefix='fs-'
|
|
}
|
|
```
|
|
|
|
When you embed multiple SVGs on a single page, the IDs can and will conflict,
|
|
especially when using `xlink:href` references (such as for text on paths and
|
|
snippets).
|
|
|
|
This allows you to specify an ID prefix so you can sidestep ID collisions.
|
|
|
|
## Example
|
|
|
|
```js
|
|
import { Aaron } from "@freesewing/aaron";
|
|
|
|
const pattern = new Aaron({
|
|
idPrefix: "something-else"
|
|
})
|
|
```
|