Terminal

The Terminal component is used to display terminal commands. User could copy the commands by clicking inside window area.

Bash
>npx nuxi init my-awesome-nuxt-app>yarn install
Click to copy
MDC
::terminal
---
content:
  - npx nuxi init my-awesome-nuxt-app
  - yarn install
---
::

Props

PropTypeDefaultDescription
content[Array, String]undefinedOne or multiple terminal commands. The prop is required

Design Tokens

tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
   docux: {
      landing: {
         terminal: {
            maxWidth: '{space.128}',
            height: '{space.64}',
            borderWidth: '0px',
            borderStyle: 'solid',
            borderColor: '{elements.border.primary.static}',
            borderRadius: '{radii.xs}',
            backgroundColor: {
               initial: 'rgba({temp.color.gray.200}, 0.7)',
               dark: 'rgba({temp.color.gray.900}, 0.7)'
            },
            boxShadow: 'inset 0px 0px 0px 1px rgba({temp.color.gray.600}, 0.3), {shadow.2xl}',
            backdropFilter: 'blur(3px)',
            header: {
               borderBottomWidth: '0px',
               borderBottomStyle: 'solid',
               borderBottomColor: '{elements.border.primary.static}',
               height: '{space.12}',
               boxShadow: 'inset 0px -1px 0px 0px rgba({temp.color.gray.600}, 0.3)'
            },
            window: {
               fontFamily: '{font.mono}',
               fontSize: '{text.sm.fontSize}',
               mixBlendMode: {
                  initial: 'normal',
                  dark: 'difference'
               },
               sign: {
                  color: {
                     initial: '{color.gray.500}',
                     dark: '{color.gray.700}'
                  }
               }
            },
            copied: {
               color: {
                  initial: '{color.gray.900}',
                  dark: '{color.gray.100}'
               }
            }
         }
      }
   }
})