ComponentsBlocksDocsExamples

Components

Code

UI Library:

A component used to display inline code, with ability to copy the content by a button.

Installation

pnpm dlx shadcn@latest add @toui/code

Examples

Copy Button

Variants

Sizes

API Reference

This component provides a flexible way to display inline code snippets with optional copy functionality.

Code

PropTypeDefault
variant enum default
size enum default
showCopyButton booleanfalse
copyText string
asChild booleanfalse
className string

Credits

  • Built with class-variance-authority for variant management.
  • Icons from Lucide React.

On This Page

  • Installation
  • Examples
    • Copy Button
    • Variants
    • Sizes
  • API Reference
    • Code
  • Credits

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking Accept, you agree to our use of cookies.
Learn more.

Token UI

Components

  • Overview
  • Pricing
  • Marketplace
  • Features
  • Integrations
  • Pricing

Blocks

  • Charts
  • Team
  • Blog
  • Careers
  • Contact
  • Privacy

Examples

  • Help
  • Sales
  • Advertise

Docs

  • Twitter
  • Instagram
  • LinkedIn

© 2025 TOUI.dev. All rights reserved.

  • Terms and Conditions
  • Privacy Policy