Skip to content

tahabozdemir/TBEmojiPicker

Repository files navigation

Banner

Emoji Picker Preview

TBEmojiPicker

This library to show a view to pick emojis for iOS.

Requirements

  • iOS 14.0 or later

Installation

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

In Xcode navigate to File → Swift Packages → Add Package Dependency. Use this URL to add the dependency:

‌https://github.com/tahabozdemir/TBEmojiPicker

Once you have your Swift package set up, adding as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/tahabozdemir/TBEmojiPicker", .upToNextMajor(from: "1.0.0"))
]

Quick Start

import SwiftUI
import TBEmojiPicker

struct ContentView: View {
    @State var selected: String = ""
    @State var isSheet: Bool = false
    var body: some View {
        VStack {
            Text("Selected Emoji is : \(selected)")
            Button("Select an Emoji") {
                isSheet.toggle()
            }
            .sheet(isPresented: $isSheet) {
                TBEmojiPicker(selectedEmoji: $selected)
            }
        }
    }
}

Usage

Selected Emoji

A binding to the selected emoji variable

 TBEmojiPicker(selectedEmoji: $selected)

Selected Color

Color of the border of the selected emoji. The default value of this property is Color.blue.

 TBEmojiPicker(selectedEmoji: $selected, selectedColor: Color.orange)

Grid Column Count

Count of grid column. The default value of this property is 5

 TBEmojiPicker(selectedEmoji: $selected, columnCount: 5)

Bottom Navigation Bar

Color of the border of the selected emoji The default value of this property is BottomNavBar(backgroundColor: .black, foregroundColor: .white).

TBEmojiPicker(selectedEmoji: $selected, bottomNavBar: BottomNavBar(backgroundColor: Color.orange, foregroundColor: .white))

Authors

About

This library to show a view to pick emojis for iOS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages