zbeyens Profile Banner
zbeyens Profile
zbeyens

@zbeyens

Followers
2K
Following
975
Statuses
356

ai editor

Brussels
Joined June 2010
Don't wanna be here? Send us removal request.
@zbeyens
zbeyens
3 months
Introducing Plate AI, a rich text editor powered by AI commands and Copilot. ◆ Configurable plugins ◆ 200+ shadcn/ui components ◆ AI SDK
36
31
436
@zbeyens
zbeyens
1 day
Title: Create React Component with Variants Description: Generates a template for a React component with customizable variants using class-variance-authority Rules: - When reading this file, I expect you to generate a new file in the src/components/ui directory - Use explicit prop types with inline TypeScript interfaces - Keep variant names descriptive and semantic (e.g., variant, size, etc.) - Follow the shadcn naming convention: lowercase for variants, PascalCase for components - Always include className prop for composition - Always use cn() utility for merging classNames - CRITICAL: Reuse existing components, Radix UI when relevant. - CRITICAL: We're using React 19 that includes ref in props, so avoid using React.forwardRef Body: ```tsx import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const ${1:component}Variants = cva( "${2:base classes}", { variants: { ${3:variantName}: { ${4:variantValue}: "${5:classes}", }, }, defaultVariants: { ${3}: "${4}", }, } ) export function ${6:ComponentName}({ className, ${3}, ...props }: { className?: string ${3}?: VariantProps["${3}"] } & React.ComponentProps<"${9:element}">) { return ( <${9:element} className={cn(${1}Variants({ ${3} }), className)} {...props} /> ) } ``` ### Example ```tsx import * as React from 'react'; import { cva, type VariantProps } from 'class-variance-authority'; import { cn } from '@/lib/utils'; const tagVariants = cva( 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', { variants: { variant: { default: 'border bg-background text-foreground hover:bg-accent hover:text-accent-foreground', primary: 'bg-primary text-primary-foreground hover:bg-primary/90', success: 'bg-success text-success-foreground hover:bg-success/90', warning: 'bg-warning text-warning-foreground hover:bg-warning/90', danger: 'bg-danger text-danger-foreground hover:bg-danger/90', }, size: { sm: 'h-7 rounded-md px-2', default: 'h-8 rounded-md px-3', lg: 'h-9 rounded-md px-4', }, }, defaultVariants: { variant: 'default', size: 'default', }, } ); export function Tag({ className, variant, size, ...props }: { className?: string; variant?: VariantProps['variant']; size?: VariantProps['size']; } & React.ComponentProps<'div'>) { return (
); } ```
0
0
3
@zbeyens
zbeyens
8 days
0
3
0
@zbeyens
zbeyens
1 month
@jaredpalmer @aisdk Selector hooks
0
0
3
@zbeyens
zbeyens
2 months
Playing with text decorations
1
2
20
@zbeyens
zbeyens
2 months
@JamieBytebender @drewsowhat @shadcn True, we even had a performance issue in local dev
0
0
1
@zbeyens
zbeyens
3 months
0
0
1
@zbeyens
zbeyens
3 months
Form example:
0
0
2
@zbeyens
zbeyens
3 months
@eduwass @shadcn the UI part:
0
0
14
@zbeyens
zbeyens
3 months
@shadcn - reduced the sidebar spacing - added deps install (click on the 📦 button icon) - added recursive registry dependencies fetching - optimized file content loading (first file on mount, others on code tab click)
0
0
3
@zbeyens
zbeyens
3 months
@pomber It reminds me
0
0
0
@zbeyens
zbeyens
3 months
@noelc @nutlope @kumardeepam It's more like an alternative to translator when you can't read the local language. Also helps when there is new ingredients you don't even know what it looks like.
1
0
1
@zbeyens
zbeyens
3 months
Available in Plate toolbar
0
0
1
@zbeyens
zbeyens
3 months
0
0
0
@zbeyens
zbeyens
3 months
0
0
0
@zbeyens
zbeyens
3 months
@erikzavodsky Working on it.
0
0
0
@zbeyens
zbeyens
3 months
@dillionverma Last missing piece:
1
0
1