1
0
Fork 0
freesewing/sites/dev/docs/reference/settings/idprefix/readme.mdx
Joost De Cock ab3204f9f1 chore: Port FreeSewing.dev to docusaurus
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.
2024-09-28 13:13:48 +02:00

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"
})
```