Scripts/New-UDTablerIcon.ps1

<#
.SYNOPSIS
    Sample control for UniversalDashboard.
.DESCRIPTION
    Sample control function for UniversalDashboard. This function must have an ID and return a hash table.
.PARAMETER Id
    An id for the component default value will be generated by new-guid.
.EXAMPLE
    PS C:\> <example usage>
    Explanation of what the example does
.INPUTS
    Inputs (if any)
.OUTPUTS
    Output (if any)
.NOTES
    General notes
#>

function New-UDTablerIcon {
    param(
        [Parameter()]
        [string]$Id = (New-Guid).ToString(),
        [Parameter()]
        [ValidateSet(
            'Twofa',
            'ThreeDCubeSphere',
            'AB',
            'AccessPointOff',
            'AccessPoint',
            'Accessible',
            'Activity',
            'Ad',
            'AdjustmentsAlt',
            'AdjustmentsHorizontal',
            'Adjustments',
            'Alarm',
            'AlertCircle',
            'AlertOctagon',
            'AlertTriangle',
            'Alien',
            'AlignCenter',
            'AlignJustified',
            'AlignLeft',
            'AlignRight',
            'Ambulance',
            'Anchor',
            'AntennaBars1',
            'AntennaBars2',
            'AntennaBars3',
            'AntennaBars4',
            'AntennaBars5',
            'Aperture',
            'Apps',
            'Archive',
            'ArrowBackUp',
            'ArrowBack',
            'ArrowBarDown',
            'ArrowBarLeft',
            'ArrowBarRight',
            'ArrowBarToDown',
            'ArrowBarToLeft',
            'ArrowBarToRight',
            'ArrowBarToUp',
            'ArrowBarUp',
            'ArrowDownCircle',
            'ArrowDownLeftCircle',
            'ArrowDownLeft',
            'ArrowDownRightCircle',
            'ArrowDownRight',
            'ArrowDown',
            'ArrowForwardUp',
            'ArrowForward',
            'ArrowLeftCircle',
            'ArrowLeft',
            'ArrowNarrowDown',
            'ArrowNarrowLeft',
            'ArrowNarrowRight',
            'ArrowNarrowUp',
            'ArrowRampLeft',
            'ArrowRampRight',
            'ArrowRightCircle',
            'ArrowRight',
            'ArrowUpCircle',
            'ArrowUpLeftCircle',
            'ArrowUpLeft',
            'ArrowUpRightCircle',
            'ArrowUpRight',
            'ArrowUp',
            'ArrowsDiagonal2',
            'ArrowsDiagonal',
            'ArrowsHorizontal',
            'ArrowsMaximize',
            'ArrowsMinimize',
            'ArrowsSort',
            'ArrowsVertical',
            'Artboard',
            'AspectRatio',
            'At',
            'Atom2',
            'Atom',
            'Award',
            'Backspace',
            'BallBasketball',
            'BallBowling',
            'BallTennis',
            'BallVolleyball',
            'Ban',
            'Bandage',
            'Barcode',
            'Basket',
            'Battery1',
            'Battery2',
            'Battery3',
            'Battery4',
            'BatteryCharging',
            'BatteryOff',
            'Battery',
            'Bed',
            'BellOff',
            'BellRinging',
            'Bell',
            'Bike',
            'Biohazard',
            'BluetoothConnected',
            'BluetoothOff',
            'Bluetooth',
            'Bold',
            'BoltOff',
            'Bolt',
            'Book',
            'BookmarkOff',
            'Bookmark',
            'Bookmarks',
            'BorderAll',
            'BorderBottom',
            'BorderHorizontal',
            'BorderInner',
            'BorderLeft',
            'BorderNone',
            'BorderOuter',
            'BorderRadius',
            'BorderRight',
            'BorderTop',
            'BorderVertical',
            'BoxSeam',
            'Box',
            'Braces',
            'Brackets',
            'BrandAndroid',
            'BrandApple',
            'BrandAppstore',
            'BrandBehance',
            'BrandChrome',
            'BrandCodepen',
            'BrandDeviantart',
            'BrandDiscord',
            'BrandDribbble',
            'BrandEdge',
            'BrandFacebook',
            'BrandFigma',
            'BrandFirefox',
            'BrandFlickr',
            'BrandFoursquare',
            'BrandFramer',
            'BrandGithub',
            'BrandGitlab',
            'BrandGoogleDrive',
            'BrandGooglePlay',
            'BrandGoogle',
            'BrandInstagram',
            'BrandLinkedin',
            'BrandMedium',
            'BrandMessenger',
            'BrandOpera',
            'BrandPaypal',
            'BrandPinterest',
            'BrandPocket',
            'BrandPython',
            'BrandReddit',
            'BrandSafari',
            'BrandSketch',
            'BrandSkype',
            'BrandSlack',
            'BrandSnapchat',
            'BrandSpotify',
            'BrandTabler',
            'BrandTailwind',
            'BrandTelegram',
            'BrandTiktok',
            'BrandTumblr',
            'BrandTwitch',
            'BrandTwitter',
            'BrandVimeo',
            'BrandWhatsapp',
            'BrandWindows',
            'BrandYoutube',
            'Briefcase',
            'BrightnessDown',
            'BrightnessUp',
            'Brightness',
            'Browser',
            'Brush',
            'Bucket',
            'Bug',
            'BuildingArch',
            'BuildingBank',
            'BuildingBridge2',
            'BuildingBridge',
            'BuildingChurch',
            'BuildingCommunity',
            'BuildingHospital',
            'BuildingMonument',
            'BuildingPavilon',
            'BuildingSkyscraper',
            'BuildingSkyscrappers',
            'BuildingStore',
            'BuildingWarehouse',
            'Building',
            'BulbOff',
            'Bulb',
            'Bus',
            'Calculator',
            'CalendarEvent',
            'CalendarMinus',
            'CalendarPlus',
            'Calendar',
            'CameraMinus',
            'CameraOff',
            'CameraPlus',
            'Camera',
            'Capture',
            'Car',
            'Caravan',
            'CaretDown',
            'CaretLeft',
            'CaretRight',
            'CaretUp',
            'Cash',
            'Cast',
            'ChartAreaLine',
            'ChartArea',
            'ChartBar',
            'ChartBubble',
            'ChartCandle',
            'ChartDonut',
            'ChartLine',
            'ChartPie',
            'Check',
            'Checkbox',
            'Checks',
            'ChevronDownLeft',
            'ChevronDownRight',
            'ChevronDown',
            'ChevronLeft',
            'ChevronRight',
            'ChevronUpLeft',
            'ChevronUpRight',
            'ChevronUp',
            'ChevronsDownLeft',
            'ChevronsDownRight',
            'ChevronsDown',
            'ChevronsLeft',
            'ChevronsRight',
            'ChevronsUpLeft',
            'ChevronsUpRight',
            'ChevronsUp',
            'Chrome',
            'CircleCheck',
            'CircleDashed',
            'CircleDotted',
            'CircleMinus',
            'CirclePlus',
            'CircleSquare',
            'CircleX',
            'Circle',
            'Circles',
            'ClearFormatting',
            'Click',
            'ClipboardCheck',
            'ClipboardList',
            'ClipboardX',
            'Clipboard',
            'Clock',
            'CloudDownload',
            'CloudFog',
            'CloudOff',
            'CloudRain',
            'CloudSnow',
            'CloudStorm',
            'CloudUpload',
            'Cloud',
            'Code',
            'Coin',
            'ColorPicker',
            'ColorSwatch',
            'Columns',
            'Comet',
            'Command',
            'Compass',
            'Contrast',
            'Copy',
            'Copyleft',
            'Copyright',
            'CornerDownLeft',
            'CornerDownRight',
            'CornerLeftDown',
            'CornerLeftUp',
            'CornerRightDown',
            'CornerRightUp',
            'CornerUpLeft',
            'CornerUpRight',
            'CreditCardOff',
            'CreditCard',
            'Crop',
            'Crosshair',
            'Crown',
            'CurlyLoop',
            'CurrencyBitcoin',
            'CurrencyDollar',
            'CurrencyEuro',
            'CurrencyPound',
            'CurrencyRupee',
            'CurrencyYen',
            'CurrentLocation',
            'Cut',
            'Dashboard',
            'Database',
            'DeviceDesktop',
            'DeviceFloppy',
            'DeviceGamepad',
            'DeviceLaptop',
            'DeviceMobileRotated',
            'DeviceMobileVibration',
            'DeviceMobile',
            'DeviceSpeaker',
            'DeviceTablet',
            'DeviceTv',
            'DeviceWatch',
            'Devices2',
            'Devices',
            'Diamond',
            'Dice',
            'DirectionHorizontal',
            'Direction',
            'Directions',
            'Disabled2',
            'Disabled',
            'Disc',
            'Discount',
            'DotsCircleHorizontal',
            'DotsDiagonal2',
            'DotsDiagonal',
            'DotsVertical',
            'Dots',
            'Download',
            'DragDrop2',
            'DragDrop',
            'Droplet',
            'Ear',
            'Edit',
            'Egg',
            'ElectricScooter',
            'Emphasis',
            'Eraser',
            'Exchange',
            'Exposure',
            'ExternalLink',
            'EyeOff',
            'Eye',
            'FaceId',
            'Fall',
            'FileCheck',
            'FileCode',
            'FileDiff',
            'FileDislike',
            'FileDownload',
            'FileHorizontal',
            'FileInvoice',
            'FileLike',
            'FileMinus',
            'FileMusic',
            'FileOff',
            'FilePhone',
            'FilePlus',
            'FileShredder',
            'FileText',
            'FileUpload',
            'FileX',
            'File',
            'FilterOff',
            'Filter',
            'Fingerprint',
            'Firetruck',
            'Flag',
            'Flame',
            'Flask',
            'FlipHorizontal',
            'FlipVertical',
            'FloatCenter',
            'FloatLeft',
            'FloatNone',
            'FloatRight',
            'FloppyDisk',
            'Focus2',
            'Focus',
            'FolderMinus',
            'FolderOff',
            'FolderPlus',
            'FolderX',
            'Folder',
            'Folders',
            'Forbid2',
            'Forbid',
            'Forklift',
            'Frame',
            'Friends',
            'GasStation',
            'Gauge',
            'Ghost',
            'Gift',
            'GitBranch',
            'GitCommit',
            'GitCompare',
            'GitFork',
            'GitMerge',
            'GitPullRequest',
            'GlassFull',
            'Glass',
            'Globe',
            'GridDots',
            'Grid',
            'GripHorizontal',
            'GripVertical',
            'H1',
            'H2',
            'H3',
            'H4',
            'H5',
            'H6',
            'HandMiddleFinger',
            'HandOff',
            'HandStop',
            'Hash',
            'HeadphonesOff',
            'Headphones',
            'Headset',
            'HeartBroken',
            'Heart',
            'Help',
            'Hexagon',
            'History',
            'Home2',
            'Home',
            'IceCream',
            'Id',
            'Inbox',
            'IndentDecrease',
            'IndentIncrease',
            'Infinity',
            'InfoCircle',
            'InfoSquare',
            'Italic',
            'Karate',
            'Key',
            'KeyboardHide',
            'KeyboardShow',
            'Keyboard',
            'Language',
            'LayersDifference',
            'LayersIntersect',
            'LayersSubtract',
            'LayersUnion',
            'Layout2',
            'LayoutAlignBottom',
            'LayoutAlignCenter',
            'LayoutAlignLeft',
            'LayoutAlignMiddle',
            'LayoutAlignRight',
            'LayoutAlignTop',
            'LayoutBottombar',
            'LayoutCards',
            'LayoutColumns',
            'LayoutDistributeHorizontal',
            'LayoutDistributeVertical',
            'LayoutKanban',
            'LayoutList',
            'LayoutNavbar',
            'LayoutRows',
            'LayoutSidebarRight',
            'LayoutSidebar',
            'Layout',
            'Lego',
            'LetterA',
            'LetterB',
            'LetterC',
            'LetterCase',
            'LetterD',
            'LetterE',
            'LetterF',
            'LetterG',
            'LetterH',
            'LetterI',
            'LetterJ',
            'LetterK',
            'LetterL',
            'LetterM',
            'LetterN',
            'LetterO',
            'LetterP',
            'LetterQ',
            'LetterR',
            'LetterS',
            'LetterT',
            'LetterU',
            'LetterV',
            'LetterW',
            'LetterX',
            'LetterY',
            'LetterZ',
            'LettersCase',
            'License',
            'Lifebuoy',
            'LineHeight',
            'Line',
            'Link',
            'ListCheck',
            'List',
            'LivePhoto',
            'LiveView',
            'LoaderQuarter',
            'Loader',
            'Location',
            'LockOff',
            'LockOpen',
            'Lock',
            'Login',
            'Logout',
            'Magnet',
            'MailOpened',
            'Mail',
            'Man',
            'Map2',
            'MapPinOff',
            'MapPin',
            'Map',
            'Markdown',
            'Marquee',
            'Mars',
            'Math',
            'Maximize',
            'Medal',
            'MedicalCross',
            'Menu2',
            'Menu',
            'Message2',
            'MessageCircle2',
            'MessageCircleOff',
            'MessageCircle',
            'MessageDots',
            'MessageOff',
            'MessagePlus',
            'MessageReport',
            'Message',
            'MessagesOff',
            'Messages',
            'MicrophoneOff',
            'Microphone',
            'Minimize',
            'Minus',
            'Mist',
            'MoodBoy',
            'MoodConfuzed',
            'MoodCry',
            'MoodHappy',
            'MoodKid',
            'MoodNeutral',
            'MoodSad',
            'MoodSmile',
            'MoodSuprised',
            'MoodTongue',
            'Moon2',
            'MoonStars',
            'Moon',
            'Moped',
            'Mouse',
            'Movie',
            'Mug',
            'Music',
            'NewSection',
            'News',
            'Note',
            'Notebook',
            'Notes',
            'Notification',
            'Octagon',
            'Omega',
            'Outlet',
            'Package',
            'PageBreak',
            'Paint',
            'Palette',
            'PanoramaHorizontal',
            'PanoramaVertical',
            'Paperclip',
            'Parentheses',
            'Parking',
            'Pause',
            'Peace',
            'Pencil',
            'Percentage',
            'PhoneCall',
            'PhoneCalling',
            'PhoneCheck',
            'PhoneIncoming',
            'PhoneOff',
            'PhoneOutgoing',
            'PhonePause',
            'PhonePlus',
            'PhoneX',
            'Phone',
            'PhotoOff',
            'Photo',
            'PictureInPictureOff',
            'PictureInPictureOn',
            'PictureInPicture',
            'Pill',
            'Pillow',
            'Pin',
            'PlaneArrival',
            'PlaneDeparture',
            'Plane',
            'Planet',
            'Play',
            'PlayerPause',
            'PlayerPlay',
            'PlayerRecord',
            'PlayerSkipBack',
            'PlayerSkipForward',
            'PlayerStop',
            'PlayerTrackNext',
            'PlayerTrackPrev',
            'Plug',
            'Plus',
            'Point',
            'Power',
            'Pray',
            'Presentation',
            'Printer',
            'Prompt',
            'Puzzle',
            'Qrcode',
            'QuestionMark',
            'Radioactive',
            'RecordMail',
            'RectangleVertical',
            'Rectangle',
            'Recycle',
            'Refresh',
            'Registered',
            'RepeatOnce',
            'Repeat',
            'Replace',
            'RoadSign',
            'Rocket',
            'Rotate2',
            'RotateClockwise2',
            'RotateClockwise',
            'RotateRectangle',
            'Rotate',
            'Route',
            'Router',
            'Rss',
            'Ruler',
            'Run',
            'Sailboat',
            'Scale',
            'Scan',
            'School',
            'Scissors',
            'ScooterElectric',
            'Scooter',
            'ScreenShareOff',
            'ScreenShare',
            'Search',
            'Select',
            'Selector',
            'Send',
            'SeparatorHorizontal',
            'SeparatorVertical',
            'Separator',
            'Server',
            'Servicemark',
            'Settings',
            'Shape',
            'Share',
            'ShieldCheck',
            'ShieldOff',
            'ShieldX',
            'Shield',
            'Ship',
            'Shirt',
            'ShoppingCart',
            'Sitemap',
            'Skateboard',
            'SkipBack',
            'SkipForward',
            'Slice',
            'Slideshow',
            'SmartHome',
            'SmokingNo',
            'Smoking',
            'Snowflake',
            'Social',
            'SortAscending',
            'SortDescending',
            'Space',
            'SquareCheck',
            'SquareMinus',
            'SquarePlus',
            'SquareRotated',
            'SquareX',
            'Square',
            'Stack',
            'StairsDown',
            'StairsUp',
            'Stairs',
            'StarHalf',
            'Star',
            'Stars',
            'SteeringWheel',
            'StepInto',
            'StepOut',
            'Sticker',
            'Strikethrough',
            'Subscript',
            'Subtask',
            'Sum',
            'Sun',
            'Sunset',
            'Sunshine',
            'Superscript',
            'Swiming',
            'Swimming',
            'SwitchHorizontal',
            'SwitchVertical',
            'Switch',
            'Table',
            'Tag',
            'Tallymark1',
            'Tallymark2',
            'Tallymark3',
            'Tallymark4',
            'Tallymarks',
            'Target',
            'Tax',
            'TemperatureCelsius',
            'TemperatureFahrenheit',
            'TemperatureMinus',
            'TemperaturePlus',
            'Temperature',
            'Template',
            'Terminal2',
            'Terminal',
            'TestPipe',
            'Test',
            'TextWrapDisabled',
            'TextWrap',
            'ThumbDown',
            'ThumbUp',
            'Ticket',
            'Tir',
            'ToggleLeft',
            'ToggleRight',
            'Tool',
            'Tools',
            'Tornado',
            'Tournament',
            'TrackNext',
            'TrackPrev',
            'Tractor',
            'Trademark',
            'TrafficCone',
            'TrafficLights',
            'Trash',
            'Trees',
            'TrendingDown',
            'TrendingUp',
            'TriangleSquareCircle',
            'Triangle',
            'Trident',
            'Trophy',
            'TruckDelivery',
            'TruckReturn',
            'Truck',
            'Typography',
            'Umbrella',
            'Underline',
            'Unlink',
            'Upload',
            'Urgent',
            'UserCheck',
            'UserExclamation',
            'UserMinus',
            'UserOff',
            'UserPlus',
            'UserX',
            'User',
            'Users',
            'VectorBeizer2',
            'VectorBeizer',
            'VectorTriangle',
            'Vector',
            'Venus',
            'VideoMinus',
            'VideoOff',
            'VideoPlus',
            'Video',
            'Viewfinder',
            'ViewportNarrow',
            'ViewportWide',
            'Virus',
            'Volume2',
            'Volume3',
            'Volume',
            'Walk',
            'Wallet',
            'Wand',
            'WaveSawTool',
            'WaveSine',
            'WaveSquare',
            'WaveTriangle',
            'Wifi0',
            'Wifi1',
            'Wifi2',
            'WifiOff',
            'Wifi',
            'Wind',
            'WiperWash',
            'Wiper',
            'Woman',
            'WorldLatitude',
            'WorldLongitude',
            'World',
            'X',
            'YinYang',
            'ZodiacAquarius',
            'ZodiacAries',
            'ZodiacCancer',
            'ZodiacCapricorn',
            'ZodiacGemini',
            'ZodiacLeo',
            'ZodiacLibra',
            'ZodiacPisces',
            'ZodiacSagittarius',
            'ZodiacScorpio',
            'ZodiacTaurus',
            'ZodiacVirgo',
            'ZoomCancel',
            'ZoomIn',
            'ZoomOut'
        )]
        [string]$Icon,
        [Parameter()]
        [int]$Size,
        [Parameter()]
        [string]$Color

    )

    End {

        @{
            # The AssetID of the main JS File
            assetId  = $AssetId
            # Tell UD this is a plugin
            isPlugin = $true
            # This ID must be the same as the one used in the JavaScript to register the control with UD
            type     = "UD-TablerIcon"
            # An ID is mandatory
            id       = $Id

            # This is where you can put any other properties. They are passed to the React control's props
            # The keys are case-sensitive in JS.
            iconName = $Icon
            size     = $Size
            color    = $Color
        }

    }
}