attributed-string

Featured

AttributedString patterns for rich text formatting, alignment, selection, and SwiftUI integration. Use when working with styled text, text editing, or AttributedString APIs.

AI & Automation 564 stars 47 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
92
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# AttributedString Patterns Correct API shapes and patterns for Foundation's `AttributedString`. Covers creating styled text, applying attributes to ranges, text alignment, writing direction, line height control, text selection and editing, discontiguous substrings, and SwiftUI integration. ## When This Skill Activates Use this skill when the user: - Asks about **AttributedString** creation or manipulation - Wants to **style text** with fonts, colors, underlines, or other attributes - Mentions **text alignment**, **writing direction**, or **line height** - Asks about **text selection** or **text editing** with AttributedString - Wants to work with **DiscontiguousAttributedSubstring** or **RangeSet** - Mentions **TextEditor** with **AttributedString** in SwiftUI - Asks about **rich text** formatting in Swift - Wants to **replace** or **modify** text within an AttributedString - Mentions **paragraphStyle**, **textSelectionAffinity**, or **AttributedTextSelection** ## Decision Tree ``` What do you need with AttributedString? | +-- Create or style text | | | +-- Simple inline attributes (font, color) | | --> Creating and Styling section | | | +-- Paragraph-level formatting (alignment, line height) | --> Text Alignment and Formatting section | +-- Control text layout | | | +-- Writing direction (LTR / RTL) | | --> Writing Direction and Line Height section | | | +-- Line spacing / height | --> Writing Direction and Line Height section | +-- ...

Details

Author
rshankras
Repository
rshankras/claude-code-apple-skills
Created
9 months ago
Last Updated
3 days ago
Language
Swift
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category