- Created a new PostCSS configuration file to integrate Tailwind CSS. - Added a skills lock file containing various Expo skills with their respective source and computed hashes.
4.7 KiB
4.7 KiB
Icons (SF Symbols)
Use SF Symbols for native feel. Never use FontAwesome or Ionicons.
Basic Usage
import { SymbolView } from "expo-symbols";
import { PlatformColor } from "react-native";
<SymbolView
tintColor={PlatformColor("label")}
resizeMode="scaleAspectFit"
name="square.and.arrow.down"
style={{ width: 16, height: 16 }}
/>;
Props
<SymbolView
name="star.fill" // SF Symbol name (required)
tintColor={PlatformColor("label")} // Icon color
size={24} // Shorthand for width/height
resizeMode="scaleAspectFit" // How to scale
weight="regular" // thin | ultraLight | light | regular | medium | semibold | bold | heavy | black
scale="medium" // small | medium | large
style={{ width: 16, height: 16 }} // Standard style props
/>
Common Icons
Navigation & Actions
house.fill- homegear- settingsmagnifyingglass- searchplus- addxmark- closechevron.left- backchevron.right- forwardarrow.left- back arrowarrow.right- forward arrow
Media
play.fill- playpause.fill- pausestop.fill- stopbackward.fill- rewindforward.fill- fast forwardspeaker.wave.2.fill- volumespeaker.slash.fill- mute
Camera
camera- cameracamera.fill- camera filledarrow.triangle.2.circlepath- flip cameraphoto- gallery/photosbolt- flashbolt.slash- flash off
Communication
message- messagemessage.fill- message filledenvelope- emailenvelope.fill- email filledphone- phonephone.fill- phone filledvideo- video callvideo.fill- video call filled
Social
heart- likeheart.fill- likedstar- favoritestar.fill- favoritedhand.thumbsup- thumbs uphand.thumbsdown- thumbs downperson- profileperson.fill- profile filledperson.2- peopleperson.2.fill- people filled
Content Actions
square.and.arrow.up- sharesquare.and.arrow.down- downloaddoc.on.doc- copytrash- deletepencil- editfolder- folderfolder.fill- folder filledbookmark- bookmarkbookmark.fill- bookmarked
Status & Feedback
checkmark- success/donecheckmark.circle.fill- completedxmark.circle.fill- error/failedexclamationmark.triangle- warninginfo.circle- infoquestionmark.circle- helpbell- notificationbell.fill- notification filled
Misc
ellipsis- more optionsellipsis.circle- more in circleline.3.horizontal- menu/hamburgerslider.horizontal.3- filtersarrow.clockwise- refreshlocation- locationlocation.fill- location filledmap- mapmappin- pinclock- timecalendar- calendarlink- linknosign- block/prohibited
Animated Symbols
<SymbolView
name="checkmark.circle"
animationSpec={{
effect: {
type: "bounce",
direction: "up",
},
}}
/>
Animation Effects
bounce- Bouncy animationpulse- Pulsing effectvariableColor- Color cyclingscale- Scale animation
// Bounce with direction
animationSpec={{
effect: { type: "bounce", direction: "up" } // up | down
}}
// Pulse
animationSpec={{
effect: { type: "pulse" }
}}
// Variable color (multicolor symbols)
animationSpec={{
effect: {
type: "variableColor",
cumulative: true,
reversing: true
}
}}
Symbol Weights
// Lighter weights
<SymbolView name="star" weight="ultraLight" />
<SymbolView name="star" weight="thin" />
<SymbolView name="star" weight="light" />
// Default
<SymbolView name="star" weight="regular" />
// Heavier weights
<SymbolView name="star" weight="medium" />
<SymbolView name="star" weight="semibold" />
<SymbolView name="star" weight="bold" />
<SymbolView name="star" weight="heavy" />
<SymbolView name="star" weight="black" />
Symbol Scales
<SymbolView name="star" scale="small" />
<SymbolView name="star" scale="medium" /> // default
<SymbolView name="star" scale="large" />
Multicolor Symbols
Some symbols support multiple colors:
<SymbolView
name="cloud.sun.rain.fill"
type="multicolor"
/>
Finding Symbol Names
- Use the SF Symbols app on macOS (free from Apple)
- Search at https://developer.apple.com/sf-symbols/
- Symbol names use dot notation:
square.and.arrow.up
Best Practices
- Always use SF Symbols over vector icon libraries
- Match symbol weight to nearby text weight
- Use
.fillvariants for selected/active states - Use PlatformColor for tint to support dark mode
- Keep icons at consistent sizes (16, 20, 24, 32)