# StyleFloat

> Style value that can be either a float or a StyleKeyword.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Implements:** [IStyleValue\<float>](/engine/6000.0/script-reference/unityengine/uielements/istylevalue1.md), [IEquatable\<StyleFloat>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct StyleFloat : IStyleValue<float>, IEquatable<StyleFloat>
```

## Constructors

| Constructor                                                                                                                                             | Description                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [StyleFloat(System.Single)](/engine/6000.0/script-reference/unityengine/uielements/stylefloat/ctor.md#stylefloat\(float\))                              | Creates from either a float or a [StyleKeyword](/engine/6000.0/script-reference/unityengine/uielements/stylekeyword.md). |
| [StyleFloat(UnityEngine.UIElements.StyleKeyword)](/engine/6000.0/script-reference/unityengine/uielements/stylefloat/ctor.md#stylefloat\(stylekeyword\)) | Creates from either a float or a [StyleKeyword](/engine/6000.0/script-reference/unityengine/uielements/stylekeyword.md). |

## Properties

| Property                                                                                | Description        |
| --------------------------------------------------------------------------------------- | ------------------ |
| [keyword](/engine/6000.0/script-reference/unityengine/uielements/stylefloat/keyword.md) | The style keyword. |
| [value](/engine/6000.0/script-reference/unityengine/uielements/stylefloat/value.md)     | The float value.   |
