Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

gpui-styling

БесплатноБез исполняемых скриптовНе проверен

Styling GPUI elements with Tailwind-like utility methods. Use when applying styles, layouts, colors, spacing, or creating responsive designs.

cnwzhuот cnwzhu★ 46 звёзд на GitHub

Об этом скилле

GPUI Styling

This skill covers styling GPUI elements using Tailwind-like utility methods.

Overview

GPUI provides chainable methods similar to Tailwind CSS:

  • Sizing: .w(), .h(), .size_full()
  • Flexbox: .flex(), .flex_col(), .items_center(), .justify_center()
  • Spacing: .p(), .m(), .gap()
  • Colors: .bg(), .text_color(), .border_color()
  • Borders: .border(), .rounded()

Sizing

Width and Height

use gpui::*;

div()
    .w(px(200.0))              // Fixed width
    .h(px(100.0))              // Fixed height
    .w_full()                   // Width: 100%
    .h_full()                   // Height: 100%
    .size_full()                // Width & Height: 100%

Relative Units

div()
    .w(relative(0.5))           // 50% of parent
    .h(relative(1.0))           // 100% of parent

Min/Max Sizes

div()
    .min_w(px(100.0))
    .max_w(px(500.0))
    .min_h(px(50.0))
    .max_h(px(300.0))

Flexbox Layout

Flex Direction

div()
    .flex()                     // Enable flexbox
    .flex_row()                 // Horizontal (default)
    .flex_col()                 // Vertical
    
// Short forms (from gpui-component)
div()
    .v_flex()                   // flex + flex_col
    .h_flex()                   // flex + flex_row

Alignment

div()
    .flex()
    .items_start()              // Align items to start
    .items_center()             // Center items
    .items_end()                // Align items to end
    .items_stretch()            // Stretch items
    
    .justify_start()            // Justify to start
    .justify_center()           // Center justify
    .justify_end()              // Justify to end
    .justify_between()          // Space between
    .justify_around()           // Space around

Flex Properties

div()
    .flex_1()                   // flex: 1 (grow to fill)
    .flex_grow()                // Allow growing
    .flex_shrink()              // Allow shrinking
    .flex_none()                // Don't grow or shrink
    .flex_wrap()                // Wrap items

Spacing

Padding

div()
    .p(px(16.0))                // All sides
    .p_1()                      // 4px (0.25rem)
    .p_2()                      // 8px (0.5rem)
    .p_4()                      // 16px (1rem)
    .p_6()                      // 24px (1.5rem)
    .p_8()                      // 32px (2rem)
    
    .px(px(16.0))               // Horizontal padding
    .py(px(16.0))               // Vertical padding
    .px_4()                     // Horizontal 16px
    .py_2()                     // Vertical 8px
    
    .pt(px(8.0))                // Top padding
    .pr(px(8.0))                // Right padding
    .pb(px(8.0))                // Bottom padding
    .pl(px(8.0))                // Left padding

Margin

div()
    .m(px(16.0))                // All sides
    .m_4()                      // 16px
    
    .mx(px(16.0))               // Horizontal margin
    .my(px(16.0))               // Vertical margin
    .mx_4()                     // Horizontal 16px
    
    .mt(px(8.0))                // Top margin
    .mr(px(8.0))                // Right margin
    .mb(px(8.0))                // Bottom margin
    .ml(px(8.0))                // Left margin

Gap

div()
    .flex()
    .flex_col()
    .gap(px(16.0))              // Gap between children
    .gap_1()                    // 4px
    .gap_2()                    // 8px
    .gap_4()                    // 16px
    .gap_6()                    // 24px

Colors

Background Colors

use gpui::*;

div()
    .bg(rgb(0x3b82f6))          // Hex color
    .bg(rgb(59, 130, 246))      // RGB
    .bg(rgba(59, 130, 246, 0.5)) // RGBA with alpha
    .bg(hsla(0.6, 0.8, 0.6, 1.0)) // HSLA

Text Colors

div()
    .text_color(rgb(0xffffff))
    .text_color(rgba(255, 255, 255, 0.9))

Border Colors

div()
    .border_color(rgb(0x4a4a4a))

Borders

Border Width

div()
    .border()                   // 1px all sides
    .border_1()                 // 1px
    .border_2()                 // 2px
    .border_t()                 // Top border
    .border_r()                 // Right border
    .border_b()                 // Bottom border
    .border_l()                 // Left border

Border Radius

div()
    .rounded(px(4.0))           // Custom radius
    .rounded_sm()               // Small radius
    .rounded_md()               // Medium radius
    .rounded_lg()               // Large radius
    .rounded_full()             // Fully rounded (circle/pill)

Typography

Font Sizes

div()
    .text_xs()                  // Extra small
    .text_sm()                  // Small
    .text_base()                // Base size (default)
    .text_lg()                  // Large
    .text_xl()                  // Extr
Полный SKILL.md на GitHub

Установить gpui-styling в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл gpui-styling?

Styling GPUI elements with Tailwind-like utility methods. Use when applying styles, layouts, colors, spacing, or creating responsive designs.

Как установить скилл gpui-styling?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл gpui-styling запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить gpui-styling с