IStyleTagOptions

interface
Utilities

Options bag for the useStyleTag composable — controls media query, immediate injection, manual mode, and the DOM id of the injected <style> element.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

media
string
Media query string for the style tag (e.g. "print", "(prefers-color-scheme: dark)").
immediate
boolean
true
When true (default), the style is injected immediately on composable setup.
manual
boolean
false
When true, injection and removal are fully manual — the composable does not load/unload automatically.
id
string
DOM id attribute set on the injected <style> tag. Auto-incremented when omitted.

Usage

Examples

Ready-to-paste code snippets using this interface.

Injecting a scoped style tag with a media query

typescript