Code Tabs

A code tabs component that allows you to switch between different code blocks with syntax highlighting.

Loading...

bash

Installation

1. Follow the links to install required rlx packages

PackageTypeLink
@rlx-widgets/tabsWidget
@rlx-components/shiki-code-blockComponent

2. Install the following dependencies

Loading...

bash

API Reference

Props list

PropTypeDefaultExampleDescription
tabs-An array of tab objects, each containing an id, label, code, language, and optional className.
themeBundledTheme"ayu-dark"github-darkThe Shiki theme to use for syntax highlighting.Full list
startAdornmentReactNode-<TerminalIcon className="w-4 h-4" />Optional content to display before the tab triggers, such as an icon or label.