Code

Code is a component used to display inline code.

Storybook@nextui-org/codeServer componentSourceStyles source
Zigma by NextUI (YC S24) - Connect your design files to production code in minutes | Product Hunt

We're live on Product Hunt! Join the conversation and help us get to #1 Product of the day 🚀


Installation

npx nextui-cli@latest add code
The above command is for individual installation only. You may skip this step if @nextui-org/react is already installed globally.

Import

Usage

Sizes

Colors

API

Code Props

AttributeTypeDescriptionDefault
childrenReactNodeThe content of the code.-
sizesm | md | lgThe size of the code.sm
colordefault | primary | secondary | success | warning | dangerThe color of the code.default
radiusnone | sm | md | lg | fullThe radius of the code.sm