BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fysk/input

Input

fysk/input
FreeComponent

Displays a form input field that handles state for you.

Install it

npx shadcn@latest add https://fysk.dev/r/input.json

Source

fysk/input.tsxfysk.dev/r/input.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import { cva, type VariantProps } from "class-variance-authority"
5import { cn } from "@/lib/utils"
6import { useFyskConfig, type FyskIconPosition } from "@/components/fysk-provider"
7import { useFyskAnimation } from "@/components/hooks/useFyskAnimation"
8
9const inputVariants = cva(
10 "flex w-full min-w-0 rounded-md shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
11 {
12 variants: {
13 variant: {
14 default: "border border-input bg-transparent dark:bg-input/30 shadow-xs",
15 outline: "border-2 border-border bg-transparent focus:border-ring/50",
16 secondary: "border border-transparent bg-muted focus:bg-background focus:border-input",
17 ghost: "border border-transparent bg-transparent hover:bg-muted focus:bg-background shadow-none",
18 glass: "bg-foreground/5 backdrop-blur-md border border-border/50 text-foreground placeholder:text-muted-foreground/50 focus:bg-foreground/10 shadow-xs",
19 },
20 size: {
21 xs: "h-7 px-2 py-1 text-xs",
22 sm: "h-8 px-2.5 py-1 text-sm",
23 md: "h-9 px-3 py-1 text-base md:text-sm",
24 lg: "h-10 px-4 py-2 text-base md:text-sm",
25 xl: "h-12 px-5 py-3 text-lg",
26 },
27 },
28 defaultVariants: {
29 variant: "default",
30 size: "md",
31 },
32 }
33)
34
35export interface InputProps
36 extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,
37 VariantProps<typeof inputVariants> {
38 state?: "idle" | "loading" | "success" | "error"
39 icon?: React.ReactNode
40 iconLoading?: React.ReactNode
41 iconSuccess?: React.ReactNode
42 iconError?: React.ReactNode
43 iconPosition?: FyskIconPosition
44 onIconClick?: (e: React.MouseEvent<HTMLButtonElement>) => void
45}
46
47const Input = React.forwardRef<HTMLInputElement, InputProps>(
48 (
49 {
50 className,
51// … truncated

What it pulls in

npm packages

  • class-variance-authority

Other registry items

  • utils
  • https://fysk.dev/r/fysk-provider.json
  • https://fysk.dev/r/fysk-hooks.json

Files it writes

  • fysk/input.tsx

Facts

Registry
fysk
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

fysk.dev ameghcoder/fysk on GitHub Raw registry item This item as JSON

More from fysk

All 18 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AvataravatarfyskComponentsFree2 deps
BadgebadgefyskComponentsFree1 dep
ButtonbuttonfyskComponentsFree2 deps
Empty StateemptyfyskComponentsFree2 deps
FormformfyskComponentsFree4 deps
fysk-providerfysk-providerfyskComponentsFree2 deps
Input OTPinput-otpfyskComponentsFreeno deps
KbdkbdfyskComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex