1. Text

Displays static or dynamic text.

Example:

Screenshot

Displays the text “Hello, World!” on the screen.

2. Button

Creates a tappable button.

Example:

2 Button

Creates a button labeled “Tap me” that prints a message when tapped.

3. Image

Displays an image from assets or system.

Example:

3 image

Displays a filled star image using SF Symbols.

4. VStack

Vertically stacks its child views.

Example:

4 VStack

Arranges “Item 1” and “Item 2” vertically.

5. HStack

Horizontally stacks its child views

Example:

5 HStack

Arranges “Item 1” and “Item 2” horizontally.

6. ZStack

Overlays views on top of each other.

Example:

6.ZStack

Places “Hello” text on top of a red background.

7. Spacer

Adds flexible spacing between views.

Example:

7 spacer

Pushes “Start” and “End” texts to opposite sides.

8. List

Displays a scrollable list of items.

Example:

8 List

Creates a vertical scrolling list with two rows.

9. ForEach

Dynamically generates views from a collection.

Example:

9 ForEach

Creates 5 text items dynamically.

10. NavigationView

Wraps views in a navigation container.

Example:

10 NavigationView

Displays the content inside a navigation context.

11. NavigationLink

Creates a navigable link to another view.

Example:

11. NavigationLink

Navigates to the “Detail View” when tapped.

12. Form

Creates a form with input fields and other controls.

Example:

12 Form

Creates a form with a label and text field.

13. TextField

Accepts user input as text.

Example:

13. TextField

Displays an editable text field with a placeholder.

14. SecureField

Creates a password-protected text input.

Example:

14. SecureField

Masks the entered text for privacy.

15. Toggle

Creates a switch to enable or disable options.

Example:

15. Toggle

Creates a switch to toggle an option on or off.

16. Slider

Creates a range-based slider for value selection.

Example:

16. Slider

Allows users to select a value between 0 and 1.

17. Picker

Presents a selection interface.

Example:

17. Picker

Creates a picker with two options.

18. Step

Provides an incremental counter control.

Example:

18. Step

Creates a stepper to increment or decrement values.

19. DatePicker

Provides a control for picking a date and/or time.

Example:

19. DatePicker

Allows users to pick a date.

20. ProgressView

Displays a progress indicator.

Example:

20. ProgressView

Shows a progress bar indicating 70% completion.

21. Sheet

Presents a modal sheet from the bottom of the screen.

Example:

21. Sheet

Displays a modal view as a sheet.

22. Alert

Displays an alert with a message and buttons.

Example:

22. Alert

Shows an alert with a warning message.

23. ActionSheet

Displays a set of options in a pop-up from the bottom.

Example:

23. ActionSheet

Presents a set of options for user action.

24. ClipShape

Clips a view into a specific shape.

Example:

24. ClipShape

Clips the image into a circular shape.

25. Opacity

Controls the opacity of a view.

Example:

25. Opacity

Sets the opacity to 50%, making the text semi-transparent.

26. RotationEffect

Applies rotation to a view.

Example:

26. RotationEffect

Rotates the text by 45 degrees.

27. ScaleEffect

Scales a view by a multiplier.

Example:

27. ScaleEffect

Increases the size of the text by 150%.

28. Shadow

Adds a shadow to a view.

Example:

28. Shadow

Adds a shadow with a radius of 5 to the text.

29. Padding

Adds padding around a view.

Example:

29. Padding

Adds 20 points of padding around the text.

30. Frame

Sets a fixed size for a view.

Example:

30. Frame

Gives the text a fixed width of 100 and height of 50.

31. Border

Adds a border around a view.

Example:

31. Borde

Adds a 2-point red border around the text.

32. Background

Applies a background view behind a view.

Example:

32. Background

dds a yellow background to the text.

33. Overlay

Adds a view on top of another view.

Example:

33. Overlay

Places text in the center of a circle.

34. OnAppear

Performs an action when a view appears.

Example:

34. OnAppear

Prints a message when the text view appears on screen.

35. OnDisappear

Performs an action when a view disappears.

Example:

35. OnDisappear

Prints a message when the view disappears.

36. Animation

Applies animations to view transitions.

Example:

36. Animation

Applies an ease-in-out animation to scaling the text.

37. Transition

Controls how a view enters or exits a screen.

Example:

37. Transition

Applies a fade-in transition effect when the text appears.

38. TabView

Creates a tabbed navigation interface.

Example:

38. TabView

Displays two tabs labeled “First” and “Second.”

39. GeometryReader

Gives access to view dimensions and layout information.

Example:

39. GeometryReader

Displays the width of the view’s parent.

40. Custom Modifier

Defines custom view modifiers.

Example:

40. Custom Modifier

Applies custom padding and background to a text view.

41. ScrollView

Creates a scrollable container for views.

Example:

41. ScrollView

Displays the text within a vertically scrollable area.

42. Color

Represents colors for backgrounds, text, etc.

Example:

42. Color

Displays a red color block.

43. CornerRadius

Applies rounded corners to a view.

Example:

43. CornerRadius

Rounds the corners of the background by 10 points.

44. Blur

Applies a blur effect to a view.

Example:

44. Blur

Blurs the text with a radius of 5.

45. SafeAreaInset

Creates custom insets for the safe area.

Example:

45. SafeAreaInset

Adds a green inset at the bottom of the view.

46. Gesture

Adds gesture recognizers to a view.

Example:

46. Gesture

Prints a message when the text is tapped.

47. PreferenceKey

Creates a custom preference key for view values.

Example:

47. PreferenceKey

Defines a custom preference key to pass values between views.

48. AlignmentGuide

Customizes the alignment of a view within a stack.

Example:

48. AlignmentGuide

Adjusts the leading alignment of the text by 20 points.

49. Mask

Applies a mask to a view, defining which parts are visible.

Example:

49. Mask

Masks the star image to only show within a circular area.

50. Environment

Accesses shared data across a view hierarchy.

Example:

50. Environment

Dynamically updates text based on the system’s color scheme (dark or light mode).