# Beste UI

> Beautiful, accessible blocks, pieces and components for shadcn/ui and Tailwind CSS, built for React and Next.js. Install one with the shadcn CLI and the code is yours to edit: no runtime dependency, nothing to upgrade.

Markdown rendition of https://ui.beste.co/piece/code5. Every page on the site has one: add `.md` to any address, or send `Accept: text/markdown`.

Last updated: 2026-05-03

Whole catalog for LLMs: https://ui.beste.co/llms.txt. Registry index: https://ui.beste.co/r/registry.json

---
1. /
2. [Pieces](/pieces)
3. /
4. [Code](/pieces/code)
5. /
6. Tokenized Line

# Tokenized Line

Single-line snippet with keywords, strings, and function names colored by semantic token kind.

`const user = await fetchUser("42");`

CLICode

Base UI

![](https://oud.pics/sm/l/npm.svg)`npx shadcn add https://ui.beste.co/piece/r-base/code5`

New here? Read the [installation guide](/docs/installation).

Import & useCopy

```
import { Code5 } from "@/components/beste/piece/code5";

<Code5
  tokens={[
    {
      "kind": "keyword",
      "text": "const"
    },
    {
      "kind": "plain",
      "text": " "
    },
    {
      "kind": "var",
      "text": "user"
    },
    {
      "kind": "plain",
      "text": " = "
    },
    {
      "kind": "keyword",
      "text": "await"
    },
    {
      "kind": "plain",
      "text": " "
    },
    {
      "kind": "fn",
      "text": "fetchUser"
    },
    {
      "kind": "punct",
      "text": "("
    },
    {
      "kind": "string",
      "text": "\"42\""
    },
    {
      "kind": "punct",
      "text": ");"
    }
  ]}
/>
```

## More Code pieces

[View all Code](/pieces/code)

[](/piece/code1)

`const greeting = "Hello, Beste!";`ts

### Code Line

One-line code snippet with a monospace pill and a tiny language tag on the right.

[](/piece/code7)

{

"name":"Beste",

"version":"1.0.0",

"active":true,

"count":42,

"owner":null

}

### JSON Snippet

Pretty-printed JSON object with sky keys, emerald strings, and amber numerics.

[](/piece/code10)

SELECT id, name, email

FROM users

WHERE active \= true

ORDER BY created\_at DESC

LIMIT 10;

### SQL Query

Multi-line SQL with violet keywords, emerald string literals, and amber numerics.

[](/piece/code13)

members.ts

```
1import { Sirius } from '@sirius/sdk'2 3const client = new Sirius(apiKey)4await client.members.create({ name })
```

### SDK Snippet Card

A code card with a filename header and copy affordance over syntax-toned, line-numbered source.

[](/piece/code2)

greet.ts

1`export function greet(name: string) {`

2``   return `Hello, ${name}!`; ``

3`}`

4` `

5`console.log(greet("Beste"));`

### Code Snippet Card

Dark editor card with three traffic-light dots, a filename tab, and line-numbered code.

[](/piece/code4)

`function greet(name) {`

\-` return 'Hi ' + name;`

+``  return `Hello, ${name}!`; ``

`}`

### Diff Snippet

Compact diff card with added, removed, and context lines tinted in emerald and rose.

## Ship the interface, keep the code.

New blocks, pieces and components every week. Install one with a command and it is yours to edit. No runtime dependency, no upgrade path to fight.

[Browse the libraryBrowse the library](/blocks)[See pricingSee pricing](/pricing)

### Library

* [Blocks](/blocks)
* [Pages](/pages)
* [Pieces](/pieces)
* [Components](/components)
* [Search](/search)

### Learn

* [Docs](/docs)
* [AI & MCP](/docs/mcp)
* [Blog](/blog)
* [Free tools](/tools)
* [What's new?](/changelog)
* [Website Builder](https://beste.co)

### More

* [Pricing](/pricing)
* [Referrals](/referrals)
* [License](/license)
* [GitHub](https://github.com/beste-co/beste-ui)

### Shadcn Blocks

* [Shadcn Hero Blocks](/blocks/hero)
* [Shadcn Feature Blocks](/blocks/feature)
* [Shadcn Pricing Blocks](/blocks/pricing)
* [Shadcn CTA Blocks](/blocks/cta)
* [Shadcn FAQ Blocks](/blocks/faq)
* [Shadcn About Blocks](/blocks/about)
* [Shadcn Stats Blocks](/blocks/stats)
* [Shadcn Footer Blocks](/blocks/footer)
* [Shadcn Navigation Blocks](/blocks/navigation)
* [Shadcn Auth Blocks](/blocks/auth)
* [Shadcn Ecommerce Blocks](/blocks/ecommerce)
* [Shadcn Portfolio Blocks](/blocks/portfolio)
* [Shadcn Showcase Blocks](/blocks/showcase)
* [Shadcn Careers Blocks](/blocks/careers)
* [Shadcn Onboarding Blocks](/blocks/onboarding)
* [Shadcn Coming Soon Blocks](/blocks/coming-soon)
* [Shadcn Post Blocks](/blocks/post)
* [Shadcn Legal Blocks](/blocks/legal)
* [Shadcn Workflow Blocks](/blocks/workflow)
* [Shadcn News Blocks](/blocks/news)

© 2026, [Beste](https://beste.co). All rights reserved.