docz-theme-default
Default theme for [docz](https://docz.site)
Last updated 6 years ago by pedronauck .
MIT · Original npm · Tarball · package.json
$ npm install docz-theme-default 
SYNC missed versions from official npm registry.

docz-theme-default

Default theme for docz

Dark Mode

To change your project to use a darker version of default theme, just set your doczrc.js like that:

// doczrc.js
export default {
  themeConfig: {
    mode: 'dark',
  },
}

Changing your logo

Use your own logo by changing the logo property:

// doczrc.js
export default {
  themeConfig: {
    logo: {
      src: '/path/of/my/logo',
      width: 150,
    },
  },
}

Changing playground theme

If you want to customize <Playground> theme, you just need to import the css of your codemirror theme and change the codemirrorTheme to use your theme. One of ways to import a new css without pain, is add new link on htmlContext:

// doczrc.js
export default {
  htmlContext: {
    head: {
      links: [
        {
          rel: 'stylesheet',
          href: 'https://codemirror.net/theme/dracula.css',
        },
      ],
    },
  },
  themeConfig: {
    codemirrorTheme: 'dracula',
  },
}

Default themeConfig

As explained on Customizing section of docz website, you can customize the theme that you're using by changing themeConfig property on your doczrc.js. So, each theme has your own specific configuration and for this theme, is that the default config and what you can change:

const config = {
  /**
   * Mode
   */
  mode: 'light', // you can use: 'dark' or 'light'
  /**
   * Show/hide Playground editor by default
   */
  showPlaygroundEditor: true,
  /**
   * Set the numbers of max lines before scroll editor
   */
  linesToScrollEditor: 14
  /**
   * Customize codemirror theme
   */
  codemirrorTheme: 'docz-light',
  /**
   * Logo
   */
  logo: {
    src: null,
    width: null,
  },
  /**
   * Radius
   */
  radii: '4px',
  /**
   * Colors (depends on select mode)
   */
  colors: {
    white: '#FFFFFF',
    grayExtraLight: '#EEF1F5',
    grayLight: '#CED4DE',
    gray: '#7D899C',
    grayDark: '#2D3747',
    grayExtraDark: '#1D2330',
    dark: '#13161F',
    blue: '#0B5FFF',
    skyBlue: '#1FB6FF',
    /** properties bellow depends on mode select */
    primary: colors.blue,
    text: colors.grayDark,
    link: colors.blue,
    footerText: colors.grayDark,
    sidebarBg: colors.grayExtraLight,
    sidebarText: colors.dark,
    sidebarHighlight: null,
    sidebarBorder: colors.grayLight,
    background: colors.white,
    border: colors.grayLight,
    theadColor: colors.gray,
    theadBg: colors.grayExtraLight,
    tableColor: colors.dark,
    codeBg: lighten(0.02, colors.grayExtraLight),
    codeColor: colors.gray,
    preBg: colors.grayExtraLight,
    blockquoteBg: colors.grayExtraLight,
    blockquoteBorder: colors.grayLight,
    blockquoteColor: colors.gray,
  },
  /**
   * Styles
   */
  styles: {
    body: css`
      font-family: ${get('fonts.ui')};
      font-size: 16px;
      line-height: 1.6;
    `,
    h1: css`
      margin: 40px 0 20px;
      font-family: ${get('fonts.display')};
      font-size: 48px;
      font-weight: 500;
      letter-spacing: -0.02em;
    `,
    h2: css`
      margin: 30px 0 20px;
      line-height: 1.4em;
      font-family: ${get('fonts.display')};
      font-weight: 500;
      font-size: 28px;
      letter-spacing: -0.02em;
    `,
    h3: css`
      margin: 25px 0 10px;
      font-size: 20px;
      font-weight: 400;
    `,
    h4: css`
      margin: 25px 0 10px;
      font-size: 16px;
      font-weight: 400;
    `,
    h5: css`
      margin: 20px 0 10px;
      font-size: 16px;
      font-weight: 400;
    `,
    h6: css`
      margin: 20px 0 10px;
      font-size: 16px;
      font-weight: 400;
      text-transform: uppercase;
    `,
    ol: css`
      padding: 0;
      margin: 10px 0 10px;
    `,
    ul: css`
      padding: 0;
      margin: 10px 0 10px;
    `,
    playground: css`
      padding: 40px;
    `,
    code: css`
      margin: 0 3px;
      border-radius: 3px;
      font-family: ${get('fonts.mono')};
      padding: 2px 5px;
      font-size: 0.8em;
      border: '1px solid rgba(0, 0, 0, 0.02)';
    `,
    pre: css`
      font-family: ${get('fonts.mono')};
      font-size: 14px;
      line-height: 1.8;
    `,
    paragraph: css`
      margin: 10px 0 20px 0;
    `,
    table: css`
      overflow-y: hidden;
      width: 100%;
      font-family: ${get('fonts.mono')};
      font-size: 14px;
      overflow-x: initial;
      display: block;
    `,
    blockquote: css`
      margin: 25px 0;
      padding: 20px;
      font-style: italic;
      font-size: 16px;
    `,
  }
}

Current Tags

  • 0.10.0-beta.0                                ...           beta (6 years ago)
  • 1.0.0-rc.21                                ...           canary (6 years ago)
  • 1.2.0                                ...           latest (6 years ago)
  • 1.0.0-rc.9                                ...           next (6 years ago)
  • 0.1.0                                ...           prerelease (6 years ago)

156 Versions

  • 1.2.0                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 1.0.0-rc.9                                ...           6 years ago
  • 1.0.0-rc.8                                ...           6 years ago
  • 1.0.0-rc.7                                ...           6 years ago
  • 1.0.0-rc.6                                ...           6 years ago
  • 1.0.0-rc.4                                ...           6 years ago
  • 1.0.0-rc.21                                ...           6 years ago
  • 1.0.0-rc.3                                ...           6 years ago
  • 1.0.0-rc.2                                ...           6 years ago
  • 1.0.0-beta.1                                ...           6 years ago
  • 1.0.0-beta.0                                ...           6 years ago
  • 1.0.0-alpha.0 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.140 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.139 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.134 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.133 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.132 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.129 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.118 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.107 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.106 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.104 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.103 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.102 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.100 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.98 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.91 [deprecated]           ...           6 years ago
  • 1.0.0-rc.1.88 [deprecated]           ...           6 years ago
  • 1.0.0-rc.1.84 [deprecated]           ...           6 years ago
  • 1.0.0-alpha.76 [deprecated]           ...           6 years ago
  • 0.13.6-alpha.67 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.68 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.67 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.66 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.54 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.51 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.47 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.44 [deprecated]           ...           6 years ago
  • 0.13.6-alpha.43 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.42 [deprecated]           ...           6 years ago
  • 0.14.0-alpha.20 [deprecated]           ...           6 years ago
  • 0.13.6-alpha.20 [deprecated]           ...           6 years ago
  • 0.13.7                                ...           6 years ago
  • 0.13.6                                ...           6 years ago
  • 0.13.6-alpha.2 [deprecated]           ...           6 years ago
  • 0.13.5                                ...           6 years ago
  • 0.13.4                                ...           6 years ago
  • 0.13.3                                ...           6 years ago
  • 0.13.3-alpha.4 [deprecated]           ...           6 years ago
  • 0.13.2                                ...           6 years ago
  • 0.13.1                                ...           6 years ago
  • 0.13.0                                ...           6 years ago
  • 0.12.17-alpha.23 [deprecated]           ...           6 years ago
  • 0.12.17                                ...           6 years ago
  • 0.12.17-alpha.3 [deprecated]           ...           6 years ago
  • 0.12.17-alpha.2 [deprecated]           ...           6 years ago
  • 0.12.17-alpha.0 [deprecated]           ...           6 years ago
  • 0.12.16                                ...           6 years ago
  • 0.12.15                                ...           6 years ago
  • 0.12.14                                ...           6 years ago
  • 0.12.13                                ...           6 years ago
  • 0.12.12                                ...           6 years ago
  • 0.12.11                                ...           6 years ago
  • 0.12.10                                ...           6 years ago
  • 0.12.9                                ...           6 years ago
  • 0.12.8                                ...           6 years ago
  • 0.12.7                                ...           6 years ago
  • 0.12.6                                ...           6 years ago
  • 0.12.5                                ...           6 years ago
  • 0.12.4                                ...           6 years ago
  • 0.12.3                                ...           6 years ago
  • 0.12.2                                ...           6 years ago
  • 0.11.2                                ...           6 years ago
  • 0.11.1                                ...           6 years ago
  • 0.11.0                                ...           6 years ago
  • 0.10.3                                ...           6 years ago
  • 0.10.2                                ...           6 years ago
  • 0.10.1                                ...           6 years ago
  • 0.10.0                                ...           6 years ago
  • 0.10.0-beta.0 [deprecated]           ...           6 years ago
  • 0.9.6                                ...           6 years ago
  • 0.9.5                                ...           6 years ago
  • 0.9.4                                ...           6 years ago
  • 0.9.4-beta.1 [deprecated]           ...           6 years ago
  • 0.9.4-beta.0 [deprecated]           ...           6 years ago
  • 0.9.3                                ...           6 years ago
  • 0.9.2                                ...           6 years ago
  • 0.9.1                                ...           6 years ago
  • 0.9.0                                ...           6 years ago
  • 0.9.0-beta.1 [deprecated]           ...           6 years ago
  • 0.9.0-beta.0 [deprecated]           ...           6 years ago
  • 0.8.0                                ...           6 years ago
  • 0.7.1                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.2                                ...           6 years ago
  • 0.6.1                                ...           6 years ago
  • 0.6.0                                ...           6 years ago
  • 0.5.9                                ...           6 years ago
  • 0.5.8                                ...           6 years ago
  • 0.5.7                                ...           6 years ago
  • 0.5.6                                ...           6 years ago
  • 0.5.5                                ...           6 years ago
  • 0.5.4                                ...           6 years ago
  • 0.5.3                                ...           6 years ago
  • 0.5.2                                ...           6 years ago
  • 0.5.1                                ...           6 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.4                                ...           6 years ago
  • 0.3.3                                ...           6 years ago
  • 0.3.2                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.3.0-beta.0 [deprecated]           ...           6 years ago
  • 0.2.11                                ...           6 years ago
  • 0.2.10                                ...           6 years ago
  • 0.2.9                                ...           6 years ago
  • 0.2.8                                ...           6 years ago
  • 0.2.7                                ...           6 years ago
  • 0.2.6                                ...           6 years ago
  • 0.2.5                                ...           6 years ago
  • 0.2.4                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.2.0-beta.2 [deprecated]           ...           6 years ago
  • 0.2.0-beta.1 [deprecated]           ...           6 years ago
  • 0.2.0-beta.0 [deprecated]           ...           6 years ago
  • 0.1.2-beta.6 [deprecated]           ...           6 years ago
  • 0.1.2-beta.5 [deprecated]           ...           6 years ago
  • 0.1.2-beta.4 [deprecated]           ...           6 years ago
  • 0.1.2-beta.3 [deprecated]           ...           6 years ago
  • 0.1.2-beta.2 [deprecated]           ...           6 years ago
  • 0.1.2-beta.1 [deprecated]           ...           6 years ago
  • 0.1.2-beta.0 [deprecated]           ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.1-beta.11 [deprecated]           ...           6 years ago
  • 0.1.1-beta.10 [deprecated]           ...           6 years ago
  • 0.1.1-beta.9 [deprecated]           ...           6 years ago
  • 0.1.1-beta.8 [deprecated]           ...           6 years ago
  • 0.1.1-beta.7 [deprecated]           ...           6 years ago
  • 0.1.1-beta.6 [deprecated]           ...           6 years ago
  • 0.1.1-beta.5 [deprecated]           ...           6 years ago
  • 0.1.1-beta.4 [deprecated]           ...           6 years ago
  • 0.1.1-beta.3 [deprecated]           ...           6 years ago
  • 0.1.1-beta.2 [deprecated]           ...           6 years ago
  • 0.1.1-beta.1 [deprecated]           ...           6 years ago
  • 0.1.1-beta.0 [deprecated]           ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 21
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 20
Dependencies (18)
Dev Dependencies (5)

© 2010 - cnpmjs.org x YWFE | Home | YWFE