import ContextDev from 'context.dev';
const client = new ContextDev({
apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
});
const response = await client.style.extractStyleguide();
console.log(response.styleguide);{
"status": "<string>",
"domain": "<string>",
"code": 123
}Automatically extract comprehensive design system information from a brandās website including colors, typography, spacing, shadows, and UI components. Either ādomainā or ādirectUrlā must be provided as a query parameter, but not both.
import ContextDev from 'context.dev';
const client = new ContextDev({
apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
});
const response = await client.style.extractStyleguide();
console.log(response.styleguide);{
"status": "<string>",
"domain": "<string>",
"code": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated.
A specific URL to fetch the styleguide from directly, bypassing domain resolution (e.g., 'https://example.com/design-system').
Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
1000 <= x <= 300000Was this page helpful?