Developer experience enhancements for the Playbook UI design system.
Rails/ERB Components - Type pb_<component_name> and press Tab:
pb_button→ Button with variant, size, and prop suggestionspb_card→ Card component with padding and spacingpb_flex→ Flex layout with alignment optionspb_avatar→ Avatar componentpb_advanced_table→ Advanced Tablepb_date_picker→ Date Picker- ...and 140+ more!
React Components - Type pb<ComponentName> and press Tab:
pbButton→ Button componentpbCard→ Card componentpbFlex→ Flex layoutpbAvatar→ Avatar componentpbAdvancedTable→ Advanced TablepbDatePicker→ Date PickerpbImport→ Import statement for any component- ...and 140+ more!
Inline documentation as you code
Hover over any Playbook component or prop to see:
- Component description and usage examples
- Available props with types and valid values
- Default values and required props
- Both Rails and React syntax examples
Works for:
- Component names:
pb_rails("button", ...)or<Button /> - Prop names in both Rails and React syntax
- Global props like padding, margin, display, etc.
Context-aware suggestions as you type
Get intelligent autocomplete for:
Component Names
- Rails: Type
pb_rails("bu...)→ See button, button_toolbar with descriptions - React: Type
<Bu...→ See Button, ButtonToolbar with snippets
Prop Names
- Rails: Type inside
props: {→ See all available props for that component - React: Type inside component tags → See component-specific and global props
- Includes 60+ global props: padding, margin, dark, display, position, etc.
Prop Values
- Automatic suggestions for enum values
- Default values prioritized first
- Shows all valid options with documentation
Global Props Available Everywhere:
- Spacing: padding, margin (with all directional variants)
- Layout: display, position, vertical_align, text_align
- Flexbox: flex_direction, align_items, justify_content
- Styling: dark, shadow, border_radius, cursor
- And 50+ more!
Catch errors before you run your code
Get instant feedback on:
- Unknown component names
- Invalid prop names
- Invalid enum values (e.g.,
variant: "invalid"when onlyprimary,secondary,linkare valid) - Works across single-line and multi-line props
Errors appear as:
- Yellow squiggly underlines in your code
- Problems panel entries with helpful messages
- Suggestions for valid values
- Open VS Code
- Press
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows/Linux) - Search for "Playbook UI Helper"
- Click Install
- Open Cursor
- Press
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows/Linux) - Search for "Playbook UI Helper"
- Click Install
The extension automatically activates when you open:
- Ruby files (
.rb) - ERB files (
.erb,.html.erb) - JavaScript React (
.jsx) - TypeScript React (
.tsx)
<!-- Type 'pb_button' and press Tab -->
<%= pb_rails("button", props: {
text: "Click Me",
variant: "primary", <!-- Autocomplete shows: primary, secondary, link -->
size: "md" <!-- Autocomplete shows: sm, md, lg -->
}) %>// Type 'pbButton' and press Tab
<Button
text="Click Me"
variant="primary" // Autocomplete shows valid variants
size="md" // Autocomplete shows valid sizes
/>- Start typing a component name or prop
- Press Ctrl+Space to trigger suggestions (or they appear automatically)
- Use arrow keys to navigate options
- Press Enter or Tab to insert
- Hover over any component or prop name
- Read the popup showing types, values, and examples
- Cmd/Ctrl+Click to open full docs in browser
- Ruby (
.rb) - ERB (
.erb,.html.erb) - JavaScript React (
.jsx) - TypeScript React (
.tsx)
For questions or issues:
MIT License - See LICENSE for details