本文へ移動
cccskills
無料GitHub で公開

vira-design

Vira's design system — TailwindCSS conventions, color palette, typography, spacing, components, and accessibility rules. Use when working on UI components, styling, or layout in this project (Lucid HTML in Haskell sources under packages/vira).

インストール方法を見る

含まれるファイル(1)

  • SKILL.md8.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Vira Design System

Clean, minimal CI/CD application design system emphasizing clarity and functionality.

Design Principles

  • KISS (Keep It Simple): Minimal, focused design without unnecessary decoration
  • Flat Design: Clean layouts with selective elevation for hierarchy
  • Technical Clarity: Clear visual communication over visual flourishes

Color Palette

Primary Colors

  • Brand accent: brand-600 (primary actions), brand-700 (hover states). The brand-* scale is declared in packages/vira/src/style.css as a @theme alias to Tailwind's cyan today — change those var(--color-cyan-*) aliases to shift the brand without touching widget code.
  • Background: gray-50 (page), white (cards), gray-200 (dividers)
    • Dark mode: gray-900 (page), gray-800 (cards), gray-700 (dividers)

Semantic Colors

  • Success: green-600 (success actions)
  • Destructive: red-600 (delete/dangerous actions)
  • Warning: yellow-500 (cautionary states)
  • Secondary: gray-100 (secondary actions)
    • Dark mode: gray-700 (secondary actions)

Neutrals

  • Text: gray-900 (primary), gray-600 (secondary), gray-500 (muted)
    • Dark mode: gray-100 (primary), gray-300 (secondary), gray-400 (muted)
  • Borders: gray-200 (default), gray-300 (interactive)
    • Dark mode: gray-700 (default), gray-600 (interactive)
  • Backgrounds: gray-50 (sections), gray-100 (subtle contrast)
    • Dark mode: gray-800 (sections), gray-700 (subtle contrast)

Typography

Font Families

  • Sans-serif: Geist (variable font, 300-700 weights), system-ui fallbacks
  • Monospace: Geist Mono (for logs, code, and technical values)

Tokens are declared as --font-sans / --font-mono in packages/vira/src/style.css (the Tailwind v4 input file). Generated static/tailwind.css exposes them via font-sans / font-mono utility classes — prefer those over hard-coded font-family declarations.

Size Scale

ClassSizeUsage
text-xs12pxBadges, table headers (uppercase), tertiary metadata
text-sm14pxBody text, form labels, buttons, timestamps
text-base16pxBreadcrumbs, emphasized body content
text-lg18pxCard subheadings, section descriptions
text-xl20pxSection headers (h2, h3)
text-2xl24pxPage headers (h1)

Weight Guidelines

WeightClassUsage
500font-mediumBadges, subtle emphasis, secondary labels
600font-semiboldButtons, tab labels, highlighted text
700font-boldAll headings (h1-h3), important values

Patterns

-- Page headers (h1)
h1_ [class_ "text-2xl font-bold text-gray-900 dark:text-gray-100"]

-- Section headers (h2)
h2_ [class_ "text-xl font-bold text-gray-900 dark:text-gray-100 mb-4"]

-- Buttons
button_ [class_ "text-sm font-semibold"]

-- Badges
span_ [class_ "text-xs font-medium"]

-- Table headers
th_ [class_ "text-xs font-medium uppercase tracking-wider"]

Spacing

Scale

ClassSizeCommon Usage
14pxIcon margins, tight gaps
28pxBadge padding, inline spacing
312pxButton padding (vertical)
416pxCard content margins, section gaps
624pxSection spacing, card padding
832pxPage section dividers

Component Patterns

ComponentPattern
Cardsp-6 (content), mb-6 (between cards)
Buttonspx-6 py-3 (primary), px-4 py-2 (secondary)
Badgespx-2 py-1 or px-3 py-1
Form groupsspace-y-6 (between groups), mb-2 (label to input)
Page sectionsspace-y-6 or mb-8
Inline itemsspace-x-2 (tight), space-x-4 (normal), gap-4 (flex)

Border Radius

ClassUsage
roundedSmall elements, code blocks
rounded-lgDefault - buttons, cards, inputs
rounded-fullBadges, pills, avatars
rounded-xlLarge feature cards, modals

Components

All components are defined in src/Vira/Widgets/*.hs with full documentation and usage examples.

Core Components

  • Buttons: viraButton_, viraButtonIcon_ (see Button.hs)
  • Cards: viraCard_ (flat), viraCardElevated_ (with shadow) (see Card.hs)
  • Layout: viraSection_, viraPageHeader_, viraDivider_ (see Layout.hs)
  • Forms: viraInput_, viraLabel_ (see Form.hs)
  • Status: viraStatusBadge_ (see Status.hs)
  • Alerts: viraAlert_ (see Alert.hs)

Usage

import Vira.Widgets qualified as W

W.viraButton_ W.ButtonPrimary [] $ do
  W.viraButtonIcon_ $ toHtmlRaw Icon.plus
  "Add Repository"

Icons

  • Library: Tabler Icons (Web.TablerIcons.Outline)
  • Standard sizes: w-4 h-4 (buttons), w-5 h-5 (UI), w-6 h-6 (headers), w-8 h-8 (sections), w-16 h-16 (hero)
  • Centering: Always use flex items-center justify-center

Visual Hierarchy

  • Elevation: Flat by default, shadow-sm only for important content
  • Spacing: Consistent spacing scale using Tailwind (space-y-*)
  • Typography: Clear text hierarchy with text-3xl, text-lg, etc.
  • Color: Semantic colors communicate meaning, not decoration

Layout

  • Responsive: Mobile-first with md:, lg:, xl: breakpoints
  • Grid: grid gap-6 md:grid-cols-2 lg:grid-cols-3
  • Container: container mx-auto with responsive padding

Accessibility Guidelines

Color Contrast

  • Primary text: text-gray-900 (high contrast)
  • Secondary text: text-gray-600 (medium contrast)
  • Muted text: text-gray-500 (minimum contrast)
  • Avoid: text-gray-400 (insufficient contrast)

Interactive Elements

  • Focus states: Clear ring indicators for keyboard navigation
  • Button text: High contrast white on colored backgrounds
  • Icon colors: Use text-gray-500 minimum for functional icons

Small Text Guidelines

  • Extra small text (text-xs): Use text-gray-600 minimum
  • Regular text: Can use text-gray-500 for secondary information
  • Interactive labels: Always use text-gray-600 or darker

Dark Mode

Vira implements automatic dark mode using Tailwind's @media (prefers-color-scheme: dark) strategy. Dark mode activates based on system preferences without any JavaScript or configuration.

Dark Mode Guidelines

  1. Always add dark variants - When using gray colors, always include dark: variants
  2. Use semantic opacity - Use opacity for tinted backgrounds (e.g., dark:bg-red-900/20)
  3. Maintain contrast - Ensure text remains readable in both modes
  4. Test both modes - Always verify styling in light and dark modes

Common Dark Mode Patterns

-- Backgrounds
"bg-white dark:bg-gray-800"
"bg-gray-50 dark:bg-gray-900"
"bg-gray-100 dark:bg-gray-700"

-- Borders
"border-gray-200 dark:border-gray-700"
"border-gray-300 dark:border-gray-600"

-- Text
"text-gray-900 dark:text-gray-100"
"text-gray-600 dark:text-gray-300"
"text-gray-500 dark:text-gray-400"

-- Semantic colors with opacity
"bg-red-50 dark:bg-red-900/20"
"bg-blue-50 dark:bg-blue-900/20"

Guidelines

  1. KISS Principle - Avoid unnecessary abstractions and complexity
  2. Accessibility First - Follow WCAG contrast requirements
  3. Dark Mode - Always include dark: variants for gray colors
  4. Use existing widgets - Check Widgets/*.hs first
  5. Follow naming - vira[ComponentName]_ pattern
  6. Accept attributes - [Attributes] parameter for extensibility
  7. Minimal shadows - Only use elevation when creating meaningful hierarchy
  8. No gradients - Prefer solid colors for clarity and performance

Refer to src/Vira/Widgets/*.hs for complete component documentation and implementation details.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Review code for quality, simplicity, and common mistakes before declaring work complete.

日本語の概要は準備中です。原文の説明を表示しています。

juspay/vira202026年5月15日 更新

do

無料

Do a task end-to-end — implement, PR, CI loop, ship. ONLY invoke when the user explicitly types `/do` or `$do`; never auto-select from a natural-language request, even one that sounds like an end-to-end task.

日本語の概要は準備中です。原文の説明を表示しています。

juspay/vira202026年5月15日 更新

elegance

無料

Iteratively study and apply elegant coding patterns. Each iteration - understand the code, research what simple and elegant code looks like, apply learnings, verify with CI. Use as a standalone refactoring pass or when the user asks to make code more elegant, simple, or idiomatic.

日本語の概要は準備中です。原文の説明を表示しています。

juspay/vira202026年5月15日 更新

Audit code for correctness and rigor — logic errors, silent error swallowing, wishful thinking, and unjustified fallbacks. This is not a style review; it's a logic review. Use when you want a focused correctness audit separate from the full code-police pass.

日本語の概要は準備中です。原文の説明を表示しています。

juspay/vira202026年5月15日 更新

forge-pr

無料

Write engaging PR titles and descriptions for any forge (GitHub today; Bitbucket planned). Use when creating or updating PRs. Leads with narrative paragraphs and reaches for lists, tables, and diagrams when content is genuinely structured.

日本語の概要は準備中です。原文の説明を表示しています。

juspay/vira202026年5月15日 更新

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

日本語の概要は準備中です。原文の説明を表示しています。

juspay/vira202026年5月15日 更新

juspay のスキルをすべて見る

このスキルの問題を報告する