The appearance of your application can be fully customised via CSS stylesheets. These are dynamically linked during runtime and can be switched from the back-end, targeting all or specific sessions.
Stylesheet imports are triggered via Framework’s mail, similarly to other features discussed in Backend-initiated actions. When the import is triggered, the front-end downloads the specified stylesheet and creates a style element with its contents.The import_stylesheet method takes the stylesheet_key and path arguments. The first works as an identifier that will let you override the stylesheet later if needed. The second is the path to the CSS file.The path specified needs to be available to the front-end, so storing it in the /static folder of your app is recommended.The following code imports a stylesheet when handling an event.
In many cases, you’ll want to import a stylesheet during initialisation time, for all users. This is easily achievable via the initial state, as shown below.
Use versions to avoid caching. During development time, stylesheets may be cached by your browser, preventing updates from being reflected. Append a querystring to bust the cache, e.g. use /static/custom.css?3.
You can use the property Custom CSS classes in the Builder’s Component Settings to apply classes to a component, separated by spaces. Internally, this will apply the classes to the root HTML element of the rendered component.
The CSS code for the class used earlier, bubblegum, can be found below. Note how the !important flag is used when targetting style attributes that are configurable via the Builder. If the flag isn’t included, these declarations will not work, because built-in Framework styling is of higher specificity.
.bubblegum { background: #ff63ca !important; line-height: 1.5; transform: rotate(-5deg);}/* Targeting an element inside the component root element */.bubblegum > h2 { color: #f9ff94 !important;}
Component structure may change. When targeting specific HTML elements inside components, take into account that the internal structure of components may change across Framework versions.
Alternatively, you can override Framework’s style variables. This behaves slightly differently though; style variables are inherited by children components. For example, if a Section has been assigned the bubblegum class, its children will also have a pink background by default.
The class can be used in Component Settings. If the stylesheet is imported, the effect will be immediate. In case the stylesheet has been modified since imported, it’ll need to be imported again.
Framework components have root HTML elements with a class linked to their type. For example, Dataframe components use the class CoreDataframe. When writing a stylesheet, you can target all Dataframe components as shown below.
It’s possible to switch stylesheets during runtime, by specifying the same stylesheet_key in subsequent calls. This allows you to implement a “theme” logic if desired, targeting the whole or a specific part of your app.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Writer AI Studio","colors":{"primary":"#BFCBFF","light":"#6985FF","dark":"#5551ff"},"logo":{"light":"https://mintcdn.com/writer/YZ72OUP7BQyK8p2G/logo/writer_logo_light.svg?fit=max\u0026auto=format\u0026n=YZ72OUP7BQyK8p2G\u0026q=85\u0026s=c9a784871f9b98724bb1eae947e745ed","dark":"https://mintcdn.com/writer/YZ72OUP7BQyK8p2G/logo/writer_logo_dark.svg?fit=max\u0026auto=format\u0026n=YZ72OUP7BQyK8p2G\u0026q=85\u0026s=9e22a34b91e20df881d68634a0042c1d"},"favicon":"https://mintcdn.com/writer/z-qGRP1BKyHYhEJN/images/icons/favicon.svg?fit=max\u0026auto=format\u0026n=z-qGRP1BKyHYhEJN\u0026q=85\u0026s=33356fdc372b2640b92c5546da07c9e0","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]}},"navbar":{"primary":{"type":"button","label":"Sign in","href":"https://app.writer.com/login"}},"footer":{"socials":{"x":"https://x.com/Get_Writer","github":"https://github.com/writer","linkedin":"https://www.linkedin.com/company/getwriter"}},"seo":{"metatags":{"description":"Writer AI Studio developer documentation - Build AI agents with APIs, SDKs, Agent Builder, and no-code tools. Integrate generative AI into your applications.","og:site_name":"Writer AI Studio Documentation","og:type":"website","twitter:card":"summary_large_image","twitter:site":"@Get_Writer"},"indexing":"all"},"integrations":{"gtm":{"tagId":"GTM-NXVXDK"},"segment":{"key":"o2ZzfP0pJxH4cihXBPrF4IlbGqmG34BA"}},"contextual":{"options":["copy","view","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"writer","hasAudioNarration":false,"actualSubdomain":"writer","customDomains":["dev.writer.com"],"gitSource":{"type":"github","owner":"writercolab","repo":"writer-monorepo","deployBranch":"main","contentDirectory":"docs-official","isPrivate":true,"mountPath":"","label":"","_id":"6aebb4e79904d1b9b86455b1"},"feedback":{"thumbs":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af20b5e5d60f235810c339a","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Home","count":98},{"language":"default","tag":"Writer Framework","count":71},{"language":"default","tag":"Component reference","count":45},{"language":"default","tag":"API Reference","count":32},{"language":"default","tag":"Connect to your data","count":31},{"language":"default","tag":"Available prebuilt connectors","count":27},{"language":"default","tag":"Content","count":17},{"language":"default","tag":"Legacy API Reference","count":16},{"language":"default","tag":"Getting started","count":14},{"language":"default","tag":"Input","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"/* devanagari */\n@font-face {\n font-family: 'Poppins';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/poppins/v24/pxiByp8kv8JHgFVrLGT9Z11lFc-K.woff2) format('woff2');\n unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Poppins';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/poppins/v24/pxiByp8kv8JHgFVrLGT9Z1JlFc-K.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Poppins';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/poppins/v24/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* devanagari */\n@font-face {\n font-family: 'Poppins';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/poppins/v24/pxiByp8kv8JHgFVrLEj6Z11lFc-K.woff2) format('woff2');\n unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Poppins';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/poppins/v24/pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Poppins';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/poppins/v24/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--purple-1: #5551FF;--purple-2: #4A46DA;--black: #000;--gray-1: #333}body{font-family:\"Graphik\", sans-serif;font-weight:400}body.bold{font-weight:600}h1{font-family:\"Poppins\", sans-serif;font-weight:600!important}h2,h3{font-family:\"Poppins\", sans-serif;font-weight:500}img[src$=\"quickstart\"]{border:1px solid #e4e7ed}img[src$=\"no-code\"]{border:1px solid #e4e7ed}img[src$=\"auth\"]{min-width:25%;width:35%;margin:auto}img[src$=\"auth-table\"]{min-width:25px;width:25px}img[src$=\"framework\"]{border:1px solid #e4e7ed}.imageBorder{border:1px solid #e4e7ed}.flex-none.min-w-full.text-sm.overflow-x-auto{background-color:#171b1a}.no-bullet li{list-style-type:none;font-size:small}.large-icon{width:60px;height:100%}.bg-primary\\/10{background-color:#bfcbff}.text-primary{color:black}.dark .prompts{color:#828282;font-family:'Roboto Mono', monospace}.prompts{color:black;font-family:'Roboto Mono', monospace}.papers{font-family:'Roboto Mono', monospace;font-size:small;padding-left:20px;padding-right:20px;text-align:justify}th,td{padding:10px 10px 10px 10px;text-align:left}.update table th,.update table td{word-break:break-word}.expandedImageContainer{padding:16px;border-radius:16px;background:#E9EEF1;overflow:hidden;display:flex;justify-content:center}.expandedImageContainerInner{display:flex;align-items:flex-start;max-width:300px;max-height:210px}.expandedImageContainer img{max-height:210px}.card{> div {\n > div {\n width: unset;\n height: unset;\n }\n }}.components__table{table-layout:fixed;width:300px}.button-wrapper{margin-top:30px}.button{border:none;cursor:pointer;font-size:14px;font-weight:600;padding:8px 20px;position:relative;outline:none;transition:background-color 0.1s ease-in}.primary-button{background-color:var(--purple-1);border-radius:40px;color:white;display:inline-flex;align-items:center;\u0026:hover{background-color:var(--purple-2)}}.secondary-button{background-color:var(--black);border-radius:30px;color:white;\u0026:hover{background-color:var(--gray-1)}}.button--arrow{padding-right:40px;\u0026::after{content:'';display:inline-block;width:12px;height:12px;background-image:url('data:image/svg+xml;utf8,\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\u003cpath id=\"Vector\" d=\"M9.47019 6.56246H0.375V5.4375H9.47019L5.19808 1.16537L5.99998 0.375L11.625 5.99998L5.99998 11.625L5.19808 10.8346L9.47019 6.56246Z\" fill=\"white\"/>\u003c/svg>');background-size:contain;background-repeat:no-repeat;position:absolute;right:16px;top:50%;transform:translateY(-50%)}}.componentFields td,.componentFields th{padding:8px;border:1px solid rgb(var(--gray-200))}.componentFields .desc{width:50ch}:is(.dark .componentFields td,.dark .componentFields th,.dark .blueprintFields td,.dark .blueprintFields th){border:1px solid rgb(var(--gray-800))}.blueprintFields td,.blueprintFields th{padding:8px;border:1px solid rgb(var(--gray-200));vertical-align:top}#topbar-cta-button{margin:0}#topbar-cta-button a{display:inline-flex;align-items:center;background-color:var(--purple-1)!important;border-radius:9999px;padding:4px 14px;font-weight:600;font-size:14px;text-decoration:none;transition:background-color 0.2s ease;line-height:24px}#topbar-cta-button a span{color:white!important}#topbar-cta-button a:hover{background-color:var(--purple-2)!important}#topbar-cta-button svg{margin-left:4px;height:16px;width:16px}#topbar-cta-button svg path{stroke:white!important;fill:none!important;stroke-width:1.5!important;stroke-linecap:round!important}li[id=\"https://app.writer.com/login\"]{margin:0;max-width:100%;box-sizing:border-box}li[id=\"https://app.writer.com/login\"] a{display:inline-flex!important;align-items:center!important;background-color:var(--purple-1)!important;border-radius:9999px!important;padding:4px 8px 4px 14px!important;font-weight:600!important;font-size:14px!important;text-decoration:none!important;transition:background-color 0.2s ease!important;line-height:24px!important;max-width:100%!important;box-sizing:border-box!important;white-space:nowrap!important;overflow:hidden!important}li[id=\"https://app.writer.com/login\"] a div,li[id=\"https://app.writer.com/login\"] a span{color:white!important}li[id=\"https://app.writer.com/login\"] a:hover{background-color:var(--purple-2)!important}li[id=\"https://app.writer.com/login\"] svg{margin-left:0px!important;height:16px!important;width:16px!important}li[id=\"https://app.writer.com/login\"] svg path{stroke:white!important;stroke-width:1.5!important;stroke-linecap:round!important;fill:none!important}div[id=\"sidebar\"]{overflow-x:hidden;box-sizing:border-box}div[id=\"sidebar-content\"]{overflow-x:hidden;box-sizing:border-box}ul[class*=\"bg-zinc-950/5\"]{max-width:100%;box-sizing:border-box;overflow-x:hidden}#content-area.max-w-5xl{max-width:80rem}#content-area.max-w-xl{max-width:60rem!important}img.max-height-800{max-height:800px!important}img.max-width-80{max-width:80%!important}#navbar .nav-tabs{flex:1 1 auto!important;width:100%!important;justify-content:center!important}"}],"page":{"pagePath":"framework/stylesheets","slug":"/framework/stylesheets","pageMetadata":{"title":"Stylesheets","description":null,"href":"/framework/stylesheets","hidden":true},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The appearance of your application can be fully customised via CSS stylesheets. These are dynamically linked during runtime and can be switched from the back-end, targeting all or specific sessions.`}),`\n`,_jsx(Heading,{level:`2`,id:`importing-a-stylesheet`,children:`Importing a stylesheet`}),`\n`,_jsxs(_components.p,{children:[`Stylesheet imports are triggered via Framework’s `,_jsx(_components.code,{children:`mail`}),`, similarly to other features discussed in `,_jsx(_components.a,{href:`/framework/backend-initiated-actions`,children:`Backend-initiated actions`}),`. When the import is triggered, the front-end downloads the specified stylesheet and creates a `,_jsx(_components.code,{children:`style`}),` element with its contents.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`import_stylesheet`}),` method takes the `,_jsx(_components.code,{children:`stylesheet_key`}),` and `,_jsx(_components.code,{children:`path`}),` arguments. The first works as an identifier that will let you override the stylesheet later if needed. The second is the path to the CSS file.The path specified needs to be available to the front-end, so storing it in the `,_jsx(_components.code,{children:`/static`}),` folder of your app is recommended.`]}),`\n`,_jsx(_components.p,{children:`The following code imports a stylesheet when handling an event.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handle_click`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` state.import_stylesheet(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"theme\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/static/custom.css\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`In many cases, you’ll want to import a stylesheet during initialisation time, for all users. This is easily achievable via the initial state, as shown below.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`initial_state `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` wf.init_state({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"counter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`initial_state.import_stylesheet(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"theme\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/static/custom.css\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use versions to avoid caching. During development time, stylesheets may be cached by your browser, preventing updates from being reflected. Append a querystring to bust the cache, e.g. use `,_jsx(_components.code,{children:`/static/custom.css?3`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`applying-css-classes`,children:`Applying CSS classes`}),`\n`,_jsxs(_components.p,{children:[`You can use the property `,_jsx(_components.em,{children:`Custom CSS classes`}),` in the Builder’s `,_jsx(_components.em,{children:`Component Settings`}),` to apply classes to a component, separated by spaces. Internally, this will apply the classes to the root HTML element of the rendered component.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.component-settings.png?fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=7bde5b1b655bc18d64c8fe53446cb7cb`,alt:`Stylesheets - Component Settings`,\"data-og-width\":`1704`,width:`1704`,\"data-og-height\":`346`,height:`346`,\"data-path\":`framework/images/stylesheets.component-settings.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.component-settings.png?w=280\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=f7c8e67136955e17a4b761efa14c5389 280w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.component-settings.png?w=560\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=d4cdf0b6b22ddf396134346320c3ee85 560w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.component-settings.png?w=840\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=38078c3bf901999b1c5bad469d6e19dc 840w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.component-settings.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=7c14d29c9cb3f3d2d36ad0ccb55b9fd0 1100w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.component-settings.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=3a8917d3978683898ed9276cdcbdf9b8 1650w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.component-settings.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=82d19c3c2a0bb66e19334263b83e35b8 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`tips-for-effective-stylesheets`,children:`Tips for effective stylesheets`}),`\n`,_jsxs(_components.p,{children:[`The CSS code for the class used earlier, `,_jsx(_components.code,{children:`bubblegum`}),`, can be found below. Note how the `,_jsx(_components.code,{children:`!important`}),` flag is used when targetting style attributes that are configurable via the Builder. If the flag isn’t included, these declarations will not work, because built-in Framework styling is of higher specificity.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`css`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`css`,children:_jsxs(_components.code,{language:`css`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D7BA7D`},children:`.bubblegum`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` background`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:`#ff63ca`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` !important`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` line-height`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` transform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`rotate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`-5`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#B5CEA8`},children:`deg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Targeting an element inside the component root element */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D7BA7D`},children:`.bubblegum`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#D7BA7D`},children:` h2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` color`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:`#f9ff94`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` !important`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Component structure may change. When targeting specific HTML elements inside components, take into account that the internal structure of components may change across Framework versions.`})}),`\n`,_jsxs(_components.p,{children:[`Alternatively, you can override Framework’s style variables. This behaves slightly differently though; style variables are inherited by children components. For example, if a `,_jsx(_components.em,{children:`Section`}),` has been assigned the `,_jsx(_components.code,{children:`bubblegum`}),` class, its children will also have a pink background by default.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`css`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`css`,children:_jsxs(_components.code,{language:`css`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D7BA7D`},children:`.bubblegum`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` --containerBackgroundColor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:`#ff63ca`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` --primaryTextColor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:`#f9ff94`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` line-height`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;\t`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` transform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`rotate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`-5`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#B5CEA8`},children:`deg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The class can be used in `,_jsx(_components.em,{children:`Component Settings`}),`. If the stylesheet is imported, the effect will be immediate. In case the stylesheet has been modified since imported, it’ll need to be imported again.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.applied-classes.png?fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=65444dbafae3a638b47f484b9d04185f`,alt:`Stylesheets - Applied Classes`,\"data-og-width\":`1686`,width:`1686`,\"data-og-height\":`346`,height:`346`,\"data-path\":`framework/images/stylesheets.applied-classes.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.applied-classes.png?w=280\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=449839ae5f1409c4342c0e8ff99f144c 280w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.applied-classes.png?w=560\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=aa26426ffebe72b2f2dc1ed6791cbae1 560w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.applied-classes.png?w=840\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=abb5349762ed4235873e3ab2ba43a4ac 840w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.applied-classes.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=e4cd8049c49f3d97b749738eba914f52 1100w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.applied-classes.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=f3a4a288941a0bcb911c558a7a8f68e7 1650w, https://mintcdn.com/writer/9jV0H_SSzBim4ReZ/framework/images/stylesheets.applied-classes.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9jV0H_SSzBim4ReZ\u0026q=85\u0026s=b0f46f5f93186668afd032d138b20e96 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`targeting-component-types`,children:`Targeting component types`}),`\n`,_jsxs(_components.p,{children:[`Framework components have root HTML elements with a class linked to their type. For example, `,_jsx(_components.em,{children:`Dataframe`}),` components use the class `,_jsx(_components.em,{children:`CoreDataframe`}),`. When writing a stylesheet, you can target all `,_jsx(_components.em,{children:`Dataframe`}),` components as shown below.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`css`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`css`,children:_jsxs(_components.code,{language:`css`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D7BA7D`},children:`.CoreDataframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` line-height`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`implementing-themes`,children:`Implementing themes`}),`\n`,_jsxs(_components.p,{children:[`It’s possible to switch stylesheets during runtime, by specifying the same `,_jsx(_components.code,{children:`stylesheet_key`}),` in subsequent calls. This allows you to implement a “theme” logic if desired, targeting the whole or a specific part of your app.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handle_cyberpunk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` state.import_stylesheet(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"theme\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/static/cyberpunk_theme.css\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handle_minimalist`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` state.import_stylesheet(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"theme\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/static/minimalist_theme.css\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Stylesheets","description":null,"href":"/framework/stylesheets","hidden":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Importing a stylesheet","slug":"importing-a-stylesheet","depth":2,"children":[]},{"title":"Applying CSS classes","slug":"applying-css-classes","depth":2,"children":[]},{"title":"Tips for effective stylesheets","slug":"tips-for-effective-stylesheets","depth":2,"children":[]},{"title":"Targeting component types","slug":"targeting-component-types","depth":2,"children":[]},{"title":"Implementing themes","slug":"implementing-themes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"writer","siteName":"Writer AI Studio","title":"Stylesheets - Writer AI Studio","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T22:43:07.038Z","originalFileLocation":"framework/stylesheets.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Writer AI Studio developer documentation - Build AI agents with APIs, SDKs, Agent Builder, and no-code tools. Integrate generative AI into your applications.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Writer AI Studio\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Stylesheets - Writer AI Studio\">\u003cmeta data-mint-head property=\"og:description\" content=\"Writer AI Studio developer documentation - Build AI agents with APIs, SDKs, Agent Builder, and no-code tools. Integrate generative AI into your applications.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Writer AI Studio Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://dev.writer.com/framework/stylesheets\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://writer.mintlify.site/_mintlify/api/og/v2?division=Advanced\u0026amp;title=Stylesheets\u0026amp;theme=42614b5f169f207d5a1f89aa\u0026amp;signature=5ab260f214743231ec4ec9b40a562d9d07d76f4542f421d76dc8c0b474b0ad5b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Stylesheets - Writer AI Studio\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Writer AI Studio developer documentation - Build AI agents with APIs, SDKs, Agent Builder, and no-code tools. Integrate generative AI into your applications.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://writer.mintlify.site/_mintlify/api/og/v2?division=Advanced\u0026amp;title=Stylesheets\u0026amp;theme=42614b5f169f207d5a1f89aa\u0026amp;signature=5ab260f214743231ec4ec9b40a562d9d07d76f4542f421d76dc8c0b474b0ad5b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/writer/rBMYB50U__7D_mBT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Writer AI Studio\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#BFCBFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://dev.writer.com/framework/stylesheets\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/framework/stylesheets.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://dev.writer.com/#organization\",\"name\":\"Writer AI Studio\",\"url\":\"https://dev.writer.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/writer/YZ72OUP7BQyK8p2G/logo/writer_logo_light.svg?fit=max\u0026auto=format\u0026n=YZ72OUP7BQyK8p2G\u0026q=85\u0026s=c9a784871f9b98724bb1eae947e745ed\"}},{\"@type\":\"WebSite\",\"@id\":\"https://dev.writer.com#website\",\"name\":\"Writer AI Studio\",\"url\":\"https://dev.writer.com\",\"publisher\":{\"@id\":\"https://dev.writer.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://dev.writer.com/framework/stylesheets#webpage\",\"url\":\"https://dev.writer.com/framework/stylesheets\",\"name\":\"Stylesheets\",\"dateModified\":\"2026-11-04T22:43:07.038Z\",\"isPartOf\":{\"@id\":\"https://dev.writer.com#website\"},\"breadcrumb\":{\"@id\":\"https://dev.writer.com/framework/stylesheets#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://dev.writer.com/framework/stylesheets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Advanced\",\"item\":\"https://dev.writer.com/framework/authentication\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Stylesheets\",\"item\":\"https://dev.writer.com/framework/stylesheets\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://dev.writer.com/framework/stylesheets#article\",\"headline\":\"Stylesheets\",\"name\":\"Stylesheets\",\"url\":\"https://dev.writer.com/framework/stylesheets\",\"mainEntityOfPage\":{\"@id\":\"https://dev.writer.com/framework/stylesheets#webpage\"},\"dateModified\":\"2026-11-04T22:43:07.038Z\",\"publisher\":{\"@id\":\"https://dev.writer.com/#organization\"},\"isPartOf\":{\"@id\":\"https://dev.writer.com#website\"}}]}\u003c/script>","siteName":"Writer AI Studio","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":"/home/introduction"}]},{"tab":"Writer Framework","icon":"shapes","hidden":true,"groups":[{"group":"Getting started","pages":[{"title":"Writer Framework","sidebarTitle":"Introduction","description":null,"href":"/framework/introduction"},{"title":"Quickstart","description":null,"href":"/framework/quickstart"},{"title":"Writer AI module","description":null,"href":"/framework/ai-module"},{"title":"Sample app library","mode":"wide","description":null,"href":"/framework/sample-apps"}]},{"group":"Guides","pages":[{"title":"Application state","description":null,"href":"/framework/application-state"},{"title":"Backend-initiated actions","description":null,"href":"/framework/backend-initiated-actions"},{"title":"Builder basics","description":null,"href":"/framework/builder-basics"},{"title":"Dataframe","description":null,"href":"/framework/dataframe"},{"title":"Event handlers","description":null,"href":"/framework/event-handlers"},{"title":"Handling inputs","description":null,"href":"/framework/handling-inputs"},{"title":"Repeater","description":null,"href":"/framework/repeater"}]},{"group":"Tutorials","pages":[{"title":"Social post generator","description":null,"href":"/framework/social-post-generator"},{"title":"Chat assistant","description":null,"href":"/framework/chat-assistant"},{"title":"Product description generator","description":null,"href":"/framework/product-description-generator"},{"title":"Release notes generator","description":null,"href":"/framework/release-notes-generator"}]},{"group":"Advanced","pages":[{"title":"Authentication","description":null,"href":"/framework/authentication"},{"title":"SEO and social sharing","mode":"wide","description":null,"href":"/framework/seo"},{"title":"Backend-driven UI","description":null,"href":"/framework/backend-driven-ui"},{"title":"Custom components","description":null,"href":"/framework/custom-components"},{"title":"Custom server","description":null,"href":"/framework/custom-server"},{"title":"Frontend scripts","description":null,"href":"/framework/frontend-scripts"},{"title":"Page routes","description":null,"href":"/framework/page-routes"},{"title":"Sessions","description":null,"href":"/framework/sessions"},{"title":"State schema","description":null,"href":"/framework/state-schema"},{"title":"Stylesheets","href":"/framework/stylesheets"},{"title":"Testing","description":null,"href":"/framework/testing"}]},{"group":"Component reference","pages":[{"group":"Layout","pages":[{"title":"Column","description":null,"href":"/components/column"},{"title":"Column Container","description":null,"href":"/components/columns"},{"title":"Horizontal Stack","description":null,"href":"/components/horizontalstack"},{"title":"Section","description":null,"href":"/components/section"},{"title":"Separator","description":null,"href":"/components/separator"},{"title":"Sidebar","description":null,"href":"/components/sidebar"},{"title":"Step","description":null,"href":"/components/step"},{"title":"Step Container","description":null,"href":"/components/steps"},{"title":"Tab","description":null,"href":"/components/tab"},{"title":"Tab Container","description":null,"href":"/components/tabs"}]},{"group":"Content","pages":[{"title":"Annotated Text","description":null,"href":"/components/annotatedtext"},{"title":"Chatbot","description":null,"href":"/components/chatbot"},{"title":"DataFrame","description":null,"href":"/components/dataframe"},{"title":"Heading","description":null,"href":"/components/heading"},{"title":"Image","description":null,"href":"/components/image"},{"title":"JSON Viewer","description":null,"href":"/components/jsonviewer"},{"title":"Link","description":null,"href":"/components/link"},{"title":"Message","description":null,"href":"/components/message"},{"title":"Metric","description":null,"href":"/components/metric"},{"title":"Plotly Graph","description":null,"href":"/components/plotlygraph"},{"title":"Progress Bar","description":null,"href":"/components/progressbar"},{"title":"Tags","description":null,"href":"/components/tags"},{"title":"Text","description":null,"href":"/components/text"},{"title":"Video Player","description":null,"href":"/components/videoplayer"}]},{"group":"Input","pages":[{"title":"Checkbox Input","description":null,"href":"/components/checkboxinput"},{"title":"Date Input","description":null,"href":"/components/dateinput"},{"title":"File Input","description":null,"href":"/components/fileinput"},{"title":"Number Input","description":null,"href":"/components/numberinput"},{"title":"Radio Input","description":null,"href":"/components/radioinput"},{"title":"Slider Range Input","description":null,"href":"/components/rangeinput"},{"title":"Rating Input","description":null,"href":"/components/ratinginput"},{"title":"Select Input","description":null,"href":"/components/selectinput"},{"title":"Slider Input","description":null,"href":"/components/sliderinput"},{"title":"Switch Input","description":null,"href":"/components/switchinput"},{"title":"Text area Input","description":null,"href":"/components/textareainput"},{"title":"Text Input","description":null,"href":"/components/textinput"},{"title":"Time Input","description":null,"href":"/components/timeinput"}]},{"group":"Other","pages":[{"title":"Button","description":null,"href":"/components/button"},{"title":"HTML Element","description":null,"href":"/components/html"},{"title":"Pagination","description":null,"href":"/components/pagination"},{"title":"Repeater","description":null,"href":"/components/repeater"},{"title":"Reuse Component","description":null,"href":"/components/reuse"},{"title":"Timer","description":null,"href":"/components/timer"}]},{"group":"Embed","pages":[{"title":"PDF","description":null,"href":"/components/pdf"},{"title":"IFrame","description":null,"href":"/components/iframe"}]}]}]},{"tab":"API Reference","icon":"key","pages":[{"title":"API Reference","href":"/api-reference/api-keys"}]},{"tab":"Legacy API Reference","hidden":true,"pages":[{"title":"Legacy API Reference","href":"/api-reference-legacy/billing/get-your-organization-subscription-details"}]}]},"basePath":"","title":"Stylesheets - Writer AI Studio","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-DkE6VzSN.js","lightbox-handle-r17bVUz3.js"]}