--- name: component-authoring description: > Use when creating or refactoring @techsio/ui-kit React components in libs/ui, including atoms, molecules, organisms, tv() variants, React 19 ref props, component token CSS, Storybook stories, package subpath exports, and Figma handoff reminders. metadata: type: "core" library: "@techsio/ui-kit" library_version: "0.3.2" requires: "tailwind-token-authoring storybook-authoring" sources: "libs/ui/AGENTS.md libs/ui/README.md libs/ui/src/atoms/button.tsx libs/ui/src/molecules/carousel.tsx libs/ui/src/organisms/header.tsx libs/ui/src/tokens/components/components.css libs/ui/stories/atoms/button.stories.tsx https://github.com/TechsioCZ/new-engine/issues/295" --- # @techsio/ui-kit Component Authoring Use this for work inside `libs/ui`. For app-side usage, load `component-usage-ux` instead. ## Setup Minimum atom shape for new component code: ```tsx import type { ButtonHTMLAttributes, Ref } from "react" import type { VariantProps } from "tailwind-variants" import { tv } from "../utils" const actionVariants = tv({ base: "inline-flex items-center justify-center rounded-action text-action-fg", variants: { variant: { primary: "bg-action-bg-primary", danger: "bg-action-bg-danger", }, size: { sm: "h-action-sm p-action-sm text-action-sm", md: "h-action-md p-action-md text-action-md", }, }, defaultVariants: { variant: "primary", size: "md" }, }) type ActionProps = ButtonHTMLAttributes & VariantProps & { ref?: Ref } export function Action({ variant, size, className, ref, ...props }: ActionProps) { return (