1
0
Fork 0
freesewing/markdown/dev/reference/settings/idprefix/en.md
2022-10-02 17:41:04 +02:00

596 B

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

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

import { Aaron } from "@freesewing/aaron";

const pattern = new Aaron({
  idPrefix: "something-else"
})