Badge

Installation

npx shadcn@latest add https://ui.timkit.cn/r/badge.json

Usage

import { Badge } from "@/components/ui/badge"

Examples

Badge · Basic badge
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · With icon
Loading preview...
Badge · Counter badge
Loading preview...
Badge · Link badge
Loading preview...
Badge · With secondary value
Loading preview...
Badge · With icon
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · With icon
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · Rounded badge
Loading preview...

Structured API

Component

badge

Logic

none

Runtime Frameworks

ReactVueWeappHTML

Supported Platforms

WebWeChat Mini Program
Configuration
PropTypeDefaultDescription
logic.provider*
enum (zag | native | none)
noneState and interaction provider used by this component.
logic.machine
string
-Underlying state machine identifier when provider is zag.
platforms*
array
Web, WeChat Mini ProgramPlatforms officially supported by this schema.
frameworks*
array
React, Vue, Weapp, HTMLFramework demos/code currently available in registry files.
dependencies
array
@timui/coreRuntime package dependencies required by this registry item.
optionalPeerDependencies
array
-Optional peer dependencies used by this registry item.
registryDependencies
array
-Dependent Timkit registry components/hook entries.
Props
PropTypeDefaultDescription
variant
enum (default | secondary | destructive | outline)
defaultThe visual style of the badge.
Slots
PropTypeDefaultDescription
default*
slot
-The content of the badge.
Parts
PropTypeDefaultDescription
root*
root
-The badge container

Variants

variantdefault: default

Visual style of the badge.

defaultsecondarydestructiveoutline
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.

Extended notes are not available for this component yet.

Badge

Installation

npx shadcn@latest add https://ui.timkit.cn/r/badge.json

Usage

import { Badge } from "@/components/ui/badge"

Examples

Badge · Basic badge
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · With icon
Loading preview...
Badge · Counter badge
Loading preview...
Badge · Link badge
Loading preview...
Badge · With secondary value
Loading preview...
Badge · With icon
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · With icon
Loading preview...
Badge · Rounded badge
Loading preview...
Badge · Rounded badge
Loading preview...

Structured API

Component

badge

Logic

none

Runtime Frameworks

ReactVueWeappHTML

Supported Platforms

WebWeChat Mini Program
Configuration
PropTypeDefaultDescription
logic.provider*
enum (zag | native | none)
noneState and interaction provider used by this component.
logic.machine
string
-Underlying state machine identifier when provider is zag.
platforms*
array
Web, WeChat Mini ProgramPlatforms officially supported by this schema.
frameworks*
array
React, Vue, Weapp, HTMLFramework demos/code currently available in registry files.
dependencies
array
@timui/coreRuntime package dependencies required by this registry item.
optionalPeerDependencies
array
-Optional peer dependencies used by this registry item.
registryDependencies
array
-Dependent Timkit registry components/hook entries.
Props
PropTypeDefaultDescription
variant
enum (default | secondary | destructive | outline)
defaultThe visual style of the badge.
Slots
PropTypeDefaultDescription
default*
slot
-The content of the badge.
Parts
PropTypeDefaultDescription
root*
root
-The badge container

Variants

variantdefault: default

Visual style of the badge.

defaultsecondarydestructiveoutline
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.

Extended notes are not available for this component yet.