---
tags:
    - "UI, Layout"
---

# Layout Element Min Width

[UI](../../index.md) / [Layout](../index.md) / [Layout Element](index.md) / **Layout Element Min Width**

## Description

Compares the Min Width property of Layout Element component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Layout Element |  |
| Compare |  |
| Value |  |

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Title("Layout Element Min Width")]
    [Category("UI/Layout/Layout Element/Min Width")]
    [Description("Compares the Min Width property of Layout Element component to another value")]
    
    [Image(typeof(IconLayoutElement), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]
    
    [Parameter("Layout Element")]
    [Parameter("Compare")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionNumber_LayoutElement_CheckMinWidth : Condition
    {
        [SerializeField] private GetGameObject m_LayoutElement = new GetGameObject(
            new GenTypeGameObject_LayoutElement()
        );
        
        [SerializeField] private CompareNumber m_Compare = new CompareNumber();
        
        [SerializeField] private GetNumber m_Value = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Min Width");
            return $"{this.m_LayoutElement} {member} {this.m_Compare} {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            LayoutElement component = this.m_LayoutElement.Get<LayoutElement>(args);
            if (component == null) return false;
            
            return this.m_Compare.Compare(component.minWidth, (float) this.m_Value.Get(args));
        }
    }
}


```

