File upload

Installation

npx shadcn@latest add https://ui.timkit.cn/r/file-upload.json

Usage

import { Fileupload } from "@/components/ui/file-upload"

Examples

Button · With icon
Loading preview...
Button · Rounded button
Loading preview...
File Upload · Remove image
Loading preview...
File Upload · Upload file
Loading preview...
File Upload · Upload image file
Loading preview...
File Upload · Uploaded Files ({files.length})
Loading preview...
File Upload · Upload image file
Loading preview...
File Upload · Upload file
Loading preview...
File Upload · Upload files
Loading preview...
File Upload · Uploaded Files ({files.length})
Loading preview...
File Upload · Files ({files.length})
Loading preview...
File Upload · Files ({files.length})
Loading preview...
File Upload · Files ({files.length})
Loading preview...
Image Cropper · Remove image
Loading preview...

Structured API

Component

button

Logic

none

Runtime Frameworks

Not declared

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
-Framework demos/code currently available in registry files.
dependencies
array
-Runtime 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
label
string
-Visible text label displayed inside the button body。
variant
enum (default | destructive | outline | secondary | ghost | link)
defaultSemantic styling preset that maps to shared design tokens。
size
enum (default | sm | lg | icon)
defaultControls the padding and typography size。
disabled
boolean
falseMarks the action as unavailable and prevents pointer / tap。
loading
boolean
falseShows a busy indicator and disables interactions。
Events
PropTypeDefaultDescription
onPress
event
-Callback that fires when the user clicks / taps the button。
Slots
PropTypeDefaultDescription
icon-left
slot
-Optional leading icon rendered before the label。
default*
slot
-The button label content,默认渲染 `label` prop。
icon-right
slot
-Optional trailing icon rendered after the label。
Parts
PropTypeDefaultDescription
root*
root
-The button element itself
label
part
-The text label inside the button
icon
part
-Optional icon element

Variants

variantdefault: default

Visual intent of the button。

defaultdestructiveoutlinesecondaryghostlink

sizedefault: default

Available control sizes。

defaultsmlgicon

Interaction States

press

Button reacts to tap / click with hover + active states。

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

File upload

Installation

npx shadcn@latest add https://ui.timkit.cn/r/file-upload.json

Usage

import { Fileupload } from "@/components/ui/file-upload"

Examples

Button · With icon
Loading preview...
Button · Rounded button
Loading preview...
File Upload · Remove image
Loading preview...
File Upload · Upload file
Loading preview...
File Upload · Upload image file
Loading preview...
File Upload · Uploaded Files ({files.length})
Loading preview...
File Upload · Upload image file
Loading preview...
File Upload · Upload file
Loading preview...
File Upload · Upload files
Loading preview...
File Upload · Uploaded Files ({files.length})
Loading preview...
File Upload · Files ({files.length})
Loading preview...
File Upload · Files ({files.length})
Loading preview...
File Upload · Files ({files.length})
Loading preview...
Image Cropper · Remove image
Loading preview...

Structured API

Component

button

Logic

none

Runtime Frameworks

Not declared

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
-Framework demos/code currently available in registry files.
dependencies
array
-Runtime 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
label
string
-Visible text label displayed inside the button body。
variant
enum (default | destructive | outline | secondary | ghost | link)
defaultSemantic styling preset that maps to shared design tokens。
size
enum (default | sm | lg | icon)
defaultControls the padding and typography size。
disabled
boolean
falseMarks the action as unavailable and prevents pointer / tap。
loading
boolean
falseShows a busy indicator and disables interactions。
Events
PropTypeDefaultDescription
onPress
event
-Callback that fires when the user clicks / taps the button。
Slots
PropTypeDefaultDescription
icon-left
slot
-Optional leading icon rendered before the label。
default*
slot
-The button label content,默认渲染 `label` prop。
icon-right
slot
-Optional trailing icon rendered after the label。
Parts
PropTypeDefaultDescription
root*
root
-The button element itself
label
part
-The text label inside the button
icon
part
-Optional icon element

Variants

variantdefault: default

Visual intent of the button。

defaultdestructiveoutlinesecondaryghostlink

sizedefault: default

Available control sizes。

defaultsmlgicon

Interaction States

press

Button reacts to tap / click with hover + active states。

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