# Text(symbol:)

[swift](../../../swift)⟩ [custom](../..) ⟩ [extension](..) ⟩ [Text+]() ⟩ <mark style="color:purple;">`Text(symbol:)`</mark>

{% tabs %}
{% tab title="🌀 Text" %}
```swift
// 2022.02.24
extension Text {
    /// `Text(symbol: "alarm")`
    init(symbol name: String) {
        self.init(Image(systemName: name))
    }
}
```
{% endtab %}

{% tab title="👥 相關" %}
* [sf-symbols](../../../swiftui/control/image/sf-symbols "mention") can be used in Text.
{% endtab %}

{% tab title="⬇️ 應用" %}
* [selected-button-with-underline](../../../swiftui/data-flow/preferences/examples/selected-button-with-underline "mention")
{% endtab %}
{% endtabs %}
