{
  "id": "06de72b6919d34e231ab0229",
  "source": "solid:solid-router",
  "type": "github-document",
  "title": "style",
  "content": "---\ntitle: Style\norder: 4\nuse_cases: 'inline styles, critical css, theme styles, dynamic styling, css-in-js'\ntags:\n  - style\n  - css\n  - inline\n  - styling\n  - head\nversion: '1.0'\ndescription: \u003e-\n  Add inline CSS styles to your Solid app's head with the Style component.\n  Useful for critical CSS and dynamic styling needs in your application.\n---\n\n`Style` is a component that adds the [`style`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style) element to your document's `head`.\n\n```tsx twoslash\nimport { Style } from \"@solidjs/meta\";\n\n\u003cStyle\u003e\n\t{`\n    body {\n      background-color: #000;\n    }\n  `}\n\u003c/Style\u003e;\n```\n\n## Usage\n\n### Adding `style` tag\n\nThe `Style` component can add CSS to style elements within your application.\nIt is recommended to add styles in an external stylesheet and use a `Link` instead, rather than using this component, however.\n\n:::tip[Note]\n\tStyles within the `Style` component are not scoped.\n:::\n\n```tsx twoslash\nimport { MetaProvider, Style } from \"@solidjs/meta\";\n\nexport default function Root() {\n\treturn (\n\t\t\u003cMetaProvider\u003e\n\t\t\t\u003cStyle\u003e{`\n          p {\n            color: #26b72b;\n          }\n        `}\u003c/Style\u003e\n\t\t\u003c/MetaProvider\u003e\n\t);\n}\n```",
  "url": "file:///tmp/devour-github-216944658/src/routes/solid-meta/reference/meta/style.mdx",
  "metadata": {
    "path": "/tmp/devour-github-216944658/src/routes/solid-meta/reference/meta/style.mdx",
    "repo": "solidjs/solid-docs",
    "repo_url": "https://github.com/solidjs/solid-docs.git",
    "size": 1186,
    "source_type": "github"
  },
  "hash": "54126249865a19a6d870d3250592dde5153405b06d0bf5faeb7e1825bfcc691b",
  "timestamp": "2026-02-23T11:39:22.44135401+01:00"
}