Imports

In order to get up and running with our tooling quickly, we offer import endpoints for themes and other design data.

Theme

Turn a url into a theme object.

curl 'https://components.ai/api/import-theme?url=google.com'

If you want a JS object rather than our internal schema you can use the as query param.

curl 'https://components.ai/api/import-theme?url=google.com&as=js'

If you have a Components AI theme id, you can pass that directly.

curl 'https://components.ai/api/import-theme?id=swcKAKDNDUUseUYPPwRj&as=js'

Palette

Turn a url into a palette.

curl 'https://components.ai/api/import-palette?url=google.com'

If you want a JS object rather than our internal schema you can use the as query param.

curl 'https://components.ai/api/import-palette?url=google.com&as=js'