From 260bb7c1ca3bebf0f77db9ceb4b96d6b1dc0aedf Mon Sep 17 00:00:00 2001 From: Mohammed Khalid Date: Tue, 29 Sep 2026 11:38:46 +0530 Subject: [PATCH] Show how to install Tansy UI on the landing page and docs The landing page had no install command anywhere, and the Storybook welcome page only linked onward to Getting started. Add an Install section to the site with the npm, pnpm, yarn and bun commands, the two styling setups, and a link to the package on npmjs.com. Repeat the npm command on the Storybook welcome page. Also correct the roadmap, which still listed publishing the first release and adding a public repository URL as pending. Both shipped in 0.4.0 and 0.4.1. --- apps/docs/src/Welcome.mdx | 8 ++- apps/site/src/App.tsx | 106 +++++++++++++++++++++++++++++++++++- apps/site/src/index.css | 111 +++++++++++++++++++++++++++++++++++++- docs/ROADMAP.md | 13 ++++- 4 files changed, 233 insertions(+), 5 deletions(-) diff --git a/apps/docs/src/Welcome.mdx b/apps/docs/src/Welcome.mdx index 90f813a..48e4421 100644 --- a/apps/docs/src/Welcome.mdx +++ b/apps/docs/src/Welcome.mdx @@ -1,4 +1,4 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta, Source } from '@storybook/addon-docs/blocks' import { DocHero, DocCards } from './DocBlocks' import { documentation, totalStories } from '@tansy/brand' @@ -11,6 +11,12 @@ import { documentation, totalStories } from '@tansy/brand' Tansy UI is named after the tansy flower, also called golden buttons: many small round heads that read as one bloom. The kit works the same way. It currently has **{documentation.length} components** and **{totalStories} stories**, built on Base UI with React 19, TypeScript and Tailwind CSS v4. +## Install + + + +Then add one line of CSS, either `@import "@openkhalix/tansy-ui/tokens.css"` for Tailwind v4 apps, or `import '@openkhalix/tansy-ui/styles.css'` for apps without Tailwind. Both setups are covered in [Getting started](/docs/introduction-getting-started--documentation). + ## Start here { + if (index === 0) return part + return {part} + }) +} + function CodeSample() { const [copied, setCopied] = useState(false) @@ -147,6 +176,35 @@ function CodeSample() { ) } +/** A dark code panel with a copy button, reused by every install command. */ +function CommandPanel({ label, code }: { label: string; code: string }) { + const [copied, setCopied] = useState(false) + + async function copy() { + try { + await navigator.clipboard.writeText(code) + setCopied(true) + window.setTimeout(() => setCopied(false), 1600) + } catch { + setCopied(false) + } + } + + return ( +
+
+ {label} + +
+
+        {highlightCommand(code)}
+      
+
+ ) +} + type FormErrors = Partial> function EmployeeForm() { @@ -302,6 +360,7 @@ function App() { v{VERSION}