Tansy UI: a themeable React component kit

Tansy UI is a React component kit by OpenKhalix, named after the tansy
flower ("golden buttons"). It has two surfaces:

- A landing page built entirely from the kit's own components, with
  five featured parts, a palette-switching playground form, and links
  into Storybook
- A Storybook workshop with Tansy branding, a Welcome page, palette
  toolbar and accessibility checks

Includes 15 components with colocated tokens and stories, seven brand
palettes, a palette-aware logo, a Docker/nginx image, a scripted
cPanel deploy, and a generator that keeps the landing page catalogue
in sync with Storybook.
This commit is contained in:
thekhalidsha committed 2026-09-28 17:09:57 +05:30
commit 9d406d6d2a
81 files changed
+14240

No files matched your search

+80
View File
@@ -0,0 +1,80 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Button, LinkButton } from './Button'
const meta = {
title: 'Actions/Button',
component: Button,
tags: ['autodocs'],
parameters: {
docs: {
description: {
component: 'A reusable button with visual variants and size tokens. Use semantic variants rather than ad-hoc colors.',
},
},
},
argTypes: {
variant: {
control: 'select',
options: ['primary', 'secondary', 'outline', 'ghost', 'danger'],
},
size: {
control: 'select',
options: ['sm', 'md', 'lg'],
},
},
args: {
children: 'Continue',
variant: 'primary',
size: 'md',
},
} satisfies Meta<typeof Button>
export default meta
type Story = StoryObj<typeof meta>
export const Playground: Story = {}
export const Variants: Story = {
render: () => (
<div className="flex flex-wrap gap-3">
<Button>Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="danger">Danger</Button>
</div>
),
}
export const Sizes: Story = {
render: () => (
<div className="flex flex-wrap items-center gap-3">
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>
</div>
),
}
export const Disabled: Story = {
args: {
disabled: true,
children: 'Unavailable',
},
}
export const AsLink: Story = {
parameters: {
docs: {
description: {
story: '`LinkButton` renders an anchor with the same variants and sizes. Use it for navigation so the page keeps real links.',
},
},
},
render: () => (
<div className="flex flex-wrap gap-3">
<LinkButton href="#">Browse components</LinkButton>
<LinkButton href="#" variant="outline">Read the guide</LinkButton>
</div>
),
}