Skip to content

ai2svelte settings reference

ai2svelte offers a comprehensive set of export settings that allow you to customize the output of your Svelte components. This reference guide provides detailed explanations for each setting available in ai2svelte, helping you understand their purpose and how to use them effectively.


If true, allows content to overflow the ai2svelte container instead of being clipped.

Options: false, true

Sets the aria-describedby attribute for the ai2svelte container, providing descriptive text for screen readers.

Default: (blank)

Sets the ARIA role attribute for the ai2svelte container, enhancing accessibility by defining its purpose to assistive technologies.

Default: (blank)

If true, centers the ai2svelte div within its container.

Options: true, false

Wraps the entire graphic in an <a> tag pointing to the given URL. Add a URL to make the entire graphic a clickable link.

Default: (blank)

Specifies the extension for the output file. .html is no longer supported.

Default: .svelte

Specifies the output folder for the generated svelte component/s.The path should be written relative to the location of the Adobe Illustrator file.

Default: ../src/lib/ai2svelte/

Sets the alt text specifically for the images in the exported Svelte component. Use alt_text setting to set alt text for the entire ai2svelte container.

Default: (blank)

Specifies the format for images exported from Illustrator. Choose the format that best suits your project’s needs in terms of quality and file size.

Options: auto, png, png24, jpg, svg

Specifies where image files are saved. The path should be written relative to the location of the Adobe Illustrator file.

Default: ../src/statics/images/graphics/

Specifies the path from which images are loaded in <img> tags. If not set, image_output_path is used. This does not change where image files are stored.

Default: images/graphics/

Whether container queries should be used for the selection of rendered artboards. Setting this to false will use Svelte screen bindings to determine the current screen size and associated artboard container.

Options: true, false

Adds data-min/max-width to the artboard containers.

Options: true, false

Whether SVG content should be inlined within the svelte component instead of being referenced as an external file.

Options: true, false

Specifies the quality of JPG images.

Options: Any integer from 0 to 100

Inserts a max-width CSS instruction to clamp the final output width by. Specify in pixels.

Options: Any positive integer

Specifies prefix for HTML elements.

Options: Any string
Default: g-

Defines the output structure for the exported Svelte components. You can choose to export a single file or multiple files based on your project requirements.

Options: one-file, multiple-files

Whether to replace tagged texts with user-inputted text. Used in conjunction with the *:text & *:htext layers.

Options: false, true

Specifies the quality of PNG or PNG24 images.

Options: Any integer from 2 to 256

Enables transparency for PNG images. Note: may degrade image quality. Use image_format: png24 for better results.

Options: yes, no

For critical graphics that users see immediately (like hero images), you can prioritize their loading to improve perceived performance.

Options: false, true

Overrides the default project name (which is the Illustrator file name). Used to name exported HTML and image files.

Options: Any string
Default: [ai file name]

Controls how rotated/sheared text is rendered.

Options: html, image

Controls how text elements from Illustrator are rendered in the exported svelte component.

Options: html, image

Whether to prioritize parent height over parent width. This makes the ai2svelte container adapt to the height of its parent element instead of the width.

Options: false, true

Whether the ai2svelte container should adapt to the size of its parent element or maintain a fixed size based on the Illustrator artboard dimensions.

Options: dynamic, fixed

If true, shows a dialog box upon export completion with summary information.

Options: true, false

Embed images inside SVG as base64.
Options: false, true

Prefix SVG ids with a string to disambiguate from other ids on the page.

Default: (blank)

If yes, renders text both on the image and in the svelte component for testing placement accuracy.

Options: no, yes

Controls whether HTML text blocks from Illustrator “area text” objects have a fixed width or expand/contract with the graphic.

Options: dynamic, fixed

If yes, outputs images at double resolution if possible (subject to size limits).

Options: yes, no

Enables lazy loading for images to improve initial load times, especially for pages with many or large images.

Options: true, false

Determines whether the artboards should be exported as image files.

Options: yes, no