SASS / SCSS

SASS preprocessing plugin.

The @bdocs/plugin-sass plugin adds official support for .scss and .sass files in Boltdocs by configuring the preprocessor in Vite.

InstallationLink

Install @bdocs/plugin-sass and sass-embedded:

bash
pnpm add -D @bdocs/plugin-sass sass-embedded

Plugin OptionsLink

OptionTypeDescription
additionalDatastringSASS/SCSS added to the start of every CSS code block (ideal for global variables/mixins).
api'modern' | 'legacy'SASS API mode (default: 'modern').
includePathsstring[]Additional directories for @use and @import resolution in legacy mode.
loadPathsstring[]Additional directories for @use and @import resolution in modern mode.
Other Sass optionsSass optionsCompiler options such as quietDeps and silenceDeprecations are forwarded to both SCSS and indented Sass.

SCSS Component ExampleLink

styles/card.module.scss
.card {
  background: var(--bdocs-bg-secondary);
  border: 1px solid var(--bdocs-border);
  border-radius: 0.5rem;
  padding: 1.5rem;

  &:hover {
    border-color: var(--bdocs-primary);
  }
}
tsx
import styles from './card.module.scss'

export function Card({ children }: { children: React.ReactNode }) {
  return <div className={styles.card}>{children}</div>
}
Last updated on October 18, 2026

Was this page helpful?