# 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/code12. 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. Env File

# Env File

Dotenv listing with sky keys, italic muted comments, and grouped sections separated by blank lines.

\# Database

DATABASE\_URL\=postgres://localhost/beste

REDIS\_URL\=redis://localhost:6379

\# API

API\_KEY\=sk\_test\_EXAMPLE\_0000

PORT\=3000

CLICode

Base UI

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

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

Import & useCopy

```
import { Code12 } from "@/components/beste/piece/code12";

<Code12
  entries={[
    {
      "kind": "comment",
      "text": "# Database"
    },
    {
      "kind": "entry",
      "key": "DATABASE_URL",
      "value": "postgres://localhost/beste"
    },
    {
      "kind": "entry",
      "key": "REDIS_URL",
      "value": "redis://localhost:6379"
    },
    {
      "kind": "blank"
    },
    {
      "kind": "comment",
      "text": "# API"
    },
    {
      "kind": "entry",
      "key": "API_KEY",
      "value": "sk_test_EXAMPLE_0000"
    },
    {
      "kind": "entry",
      "key": "PORT",
      "value": "3000"
    }
  ]}
/>
```

## 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/code9)

TypeError: Cannot read 'name' of undefined

atgreet(src/utils.ts:14:12)

athandler(src/server.ts:42:8)

atprocessRequest(src/api.ts:88:4)

### Stack Trace

Error headline followed by a few stack frames with file paths and amber line and column numbers.

[](/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/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.

[](/piece/code6)

import{useState, useEffect}from"react";

import{Button}from"@/ui/button";

import{cn}from"@/lib/utils";

### Import Block

Stacked import statements with destructured names and module paths in a quiet syntax palette.

## 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.