Files
tansy-ui/.storybook/tansyTheme.ts
T
thekhalidsha 9d406d6d2a 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.
2026-09-28 17:09:57 +05:30

47 lines
1.5 KiB
TypeScript

import { create } from 'storybook/theming'
/**
* Tansy UI branding for the Storybook manager and docs pages.
*
* `brandTitle` is HTML: the mark comes from `public/` (served via `staticDirs`)
* and is referenced relatively so it resolves both at `/` in dev and under
* `/docs/` in production.
*/
export const tansyTheme = create({
base: 'light',
brandTitle: `<span style="display:inline-flex;align-items:center;gap:8px;white-space:nowrap">
<img src="./tansy-mark.svg" width="28" height="28" alt="" />
<span style="font-family:'Schibsted Grotesk',sans-serif;font-weight:800;font-size:19px;letter-spacing:-0.03em;color:#12151c">Tansy <span style="font-weight:700;color:#6b7384">UI</span></span>
<span style="font-size:11px;color:#6b7384;padding-left:8px;border-left:1px solid #c5cad4">by OpenKhalix</span>
</span>`,
brandUrl: '/',
brandTarget: '_self',
colorPrimary: '#305ddd',
colorSecondary: '#305ddd',
appBg: '#f3f4f6',
appContentBg: '#ffffff',
appPreviewBg: '#ffffff',
appBorderColor: '#dde1e8',
appBorderRadius: 8,
fontBase: '"Instrument Sans", "Helvetica Neue", Arial, sans-serif',
fontCode: '"JetBrains Mono", "SFMono-Regular", Consolas, monospace',
textColor: '#12151c',
textInverseColor: '#ffffff',
textMutedColor: '#6b7384',
barBg: '#ffffff',
barTextColor: '#4a5162',
barSelectedColor: '#305ddd',
barHoverColor: '#305ddd',
inputBg: '#ffffff',
inputBorder: '#c5cad4',
inputTextColor: '#12151c',
inputBorderRadius: 6,
})