VaneUI

VaneUI

Basic Components

Code

Renders inline code snippets with syntax highlighting. Perfect for displaying code examples, commands, file paths, or technical terms within text content.

Basic Usage

Inline code snippets with default styling.

Use the npm install command to install packages.The const variable = 'value' syntax declares a constant.
react-icon

BasicUsage.tsx

<Row flexWrap>
<span>
Use the
<Code>npm install</Code>
command to install packages.
</span>
<span>
The
<Code>const variable = 'value'</Code>
syntax declares a constant.
</span>
</Row>

Sizes

Code elements in different sizes - xs, sm, md, lg, xl.

Size xs: console.log('Hello')
Size sm: console.log('Hello')
Size md: console.log('Hello')
Size lg: console.log('Hello')
Size xl: console.log('Hello')
react-icon

Sizes.tsx

<Col>
<Row>
<span>
Size xs:
<Code xs>console.log('Hello')</Code>
</span>
</Row>
<Row>
<span>
Size sm:
<Code sm>console.log('Hello')</Code>
</span>
</Row>
<Row>
<span>
Size md:
<Code md>console.log('Hello')</Code>
</span>
</Row>
<Row>
<span>
Size lg:
<Code lg>console.log('Hello')</Code>
</span>
</Row>
<Row>
<span>
Size xl:
<Code xl>console.log('Hello')</Code>
</span>
</Row>
</Col>

Appearances

Different code color variants for syntax highlighting.

default codeaccent codeprimary codesecondary codetertiary codesuccess codedanger codewarning codeinfo codelink code
react-icon

Appearances.tsx

<Row flexWrap>
<Code default>default code</Code>
<Code accent>accent code</Code>
<Code primary>primary code</Code>
<Code secondary>secondary code</Code>
<Code tertiary>tertiary code</Code>
<Code success>success code</Code>
<Code danger>danger code</Code>
<Code warning>warning code</Code>
<Code info>info code</Code>
<Code link>link code</Code>
</Row>

Font Weights

Code elements with different font weights.

font-thinfont-extralightfont-lightfont-normalfont-mediumfont-semiboldfont-boldfont-extraboldfont-black
react-icon

FontWeights.tsx

<Row flexWrap>
<Code lg thin>font-thin</Code>
<Code extralight lg>font-extralight</Code>
<Code lg light>font-light</Code>
<Code lg normal>font-normal</Code>
<Code lg medium>font-medium</Code>
<Code lg semibold>font-semibold</Code>
<Code bold lg>font-bold</Code>
<Code extrabold lg>font-extrabold</Code>
<Code black lg>font-black</Code>
</Row>

Code in Context

Code elements used within text content.

To create a new React component, use function Component() {} or the arrow function syntax const Component = () => {}.

Install the package with npm i @vaneui/ui and then import it using import { Button } from "@vaneui/ui".

The useState hook returns an array with two elements: the current state value and a setter function like [state, setState].

Configure your environment by setting NODE_ENV='production' in your .env file.

react-icon

CodeinContext.tsx

<Col>
<Text>
To create a new React component, use
<Code>{`function Component() {}`}</Code>
or the arrow function syntax
<Code>{`const Component = () => {}`}</Code>
.
</Text>
<p>
Install the package with
<Code primary>npm i @vaneui/ui</Code>
and then import it using
<Code secondary>{`import { Button } from "@vaneui/ui"`}</Code>
.
</p>
<Text>
The
<Code info>useState</Code>
hook returns an array with two elements: the current state value and a setter function like
<Code info>[state, setState]</Code>
.
</Text>
<p>
Configure your environment by setting
<Code warning>NODE_ENV='production'</Code>
in your
<Code>.env</Code>
file.
</p>
</Col>

Keyboard Shortcuts

Code elements for displaying keyboard shortcuts and commands.

Ctrl+C

or

Cmd+V

react-icon

KeyboardShortcuts.tsx

<Row flexWrap>
<Text primary>
<Code>Ctrl</Code>
+
<Code>C</Code>
</Text>
or
<Text primary>
<Code primary>Cmd</Code>
+
<Code primary>V</Code>
</Text>
</Row>

File Paths and URLs

Code elements for displaying file paths and URLs.

File path: /usr/local/bin/node
Import path: @/components/Button
URL: https://api.example.com/v1/users
Config file: tsconfig.json
react-icon

FilePathsandURLs.tsx

<Col sm>
<Row>
File path:
<Code>/usr/local/bin/node</Code>
</Row>
<Row>
Import path:
<Code secondary>@/components/Button</Code>
</Row>
<Row>
URL:
<Code info>https://api.example.com/v1/users</Code>
</Row>
<Row>
Config file:
<Code warning>tsconfig.json</Code>
</Row>
</Col>

Code Props

size

  • xs
  • sm
  • md
  • lg
  • xl
  • hide

  • xsHide
  • smHide
  • mdHide
  • lgHide
  • xlHide
  • items

  • itemsStart
  • itemsEnd
  • itemsCenter
  • itemsBaseline
  • itemsStretch
  • justify

  • justifyStart
  • justifyEnd
  • justifyCenter
  • justifyBetween
  • justifyAround
  • justifyEvenly
  • justifyStretch
  • justifyBaseline
  • position

  • relative
  • absolute
  • fixed
  • sticky
  • static
  • display

  • inline
  • block
  • inlineBlock
  • flex
  • inlineFlex
  • grid
  • inlineGrid
  • contents
  • table
  • tableCell
  • hidden
  • overflow

  • overflowAuto
  • overflowHidden
  • overflowClip
  • overflowVisible
  • overflowScroll
  • overflowXAuto
  • overflowYAuto
  • overflowXHidden
  • overflowYHidden
  • overflowXClip
  • overflowYClip
  • overflowXVisible
  • overflowYVisible
  • overflowXScroll
  • overflowYScroll
  • wrap

  • flexWrap
  • flexNoWrap
  • flexWrapReverse
  • gap

  • gap
  • noGap
  • flexDirection

  • row
  • column
  • rowReverse
  • columnReverse
  • reverse

  • reverse
  • appearance

  • default
  • accent
  • primary
  • secondary
  • tertiary
  • success
  • danger
  • warning
  • info
  • link
  • transparent

  • transparent
  • border

  • border
  • borderT
  • borderB
  • borderL
  • borderR
  • borderX
  • borderY
  • noBorder
  • shadow

  • shadow
  • noShadow
  • ring

  • ring
  • noRing
  • focusVisible

  • focusVisible
  • noFocusVisible
  • shape

  • pill
  • sharp
  • rounded
  • fontWeight

  • thin
  • extralight
  • light
  • normal
  • medium
  • semibold
  • bold
  • extrabold
  • black
  • fontStyle

  • italic
  • notItalic
  • textDecoration

  • underline
  • lineThrough
  • noUnderline
  • overline
  • textTransform

  • uppercase
  • lowercase
  • capitalize
  • normalCase
  • fontFamily

  • sans
  • serif
  • mono
  • textAlign

  • textLeft
  • textCenter
  • textRight
  • textJustify
  • padding

  • padding
  • noPadding
  • variant

  • filled
  • outline