Frameworks
@skyscribe-sdk/styles is a plain CSS package: no JavaScript, no build step, no framework dependency. It styles Document content (code blocks, blockquotes, lists, checklists, images) inside any element with the scribe-content class. Install it alongside whichever framework adapter you're using:
npm install @skyscribe-sdk/styles
Import the stylesheet once, then use @skyscribe-sdk/react's <ScribeContent> component, which applies the scribe-content class for you:
import { ScribeContent } from '@skyscribe-sdk/react';
import '@skyscribe-sdk/styles';
<ScribeContent html={document.content} />
<script setup lang="ts">
import '@skyscribe-sdk/styles';
</script>
<template>
<div class="scribe-content" v-html="document.content" />
</template>
Add the stylesheet to your global styles in angular.json:
"styles": [
"src/styles.css",
"node_modules/@skyscribe-sdk/styles/src/index.css"
]
<div class="scribe-content" [innerHTML]="doc.content"></div>
Import once, typically in your root layout:
// app/layout.tsx
import '@skyscribe-sdk/styles';
In server components, render the HTML into an element with the scribe-content class:
<div className="scribe-content" dangerouslySetInnerHTML={{ __html: document.content }} />
(@skyscribe-sdk/react's package entry also contains client-side hooks, so keep its <ScribeContent> for client components.)
Import the stylesheet, and apply the scribe-content class to whichever element you render document.content into:
<link rel="stylesheet" href="/node_modules/@skyscribe-sdk/styles/src/index.css" />
<!-- or, if bundling: import "@skyscribe-sdk/styles"; -->
<div class="scribe-content"><!-- document.content HTML here --></div>
See the API reference for the complete list of styled elements and every --scribe-* custom property available for theming (dark mode, brand colours, custom syntax-highlight palettes).