Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sancarn/uiVBA

Expansion of stdVBA to include UI components
https://github.com/sancarn/uiVBA

Last synced: 9 days ago
JSON representation

Expansion of stdVBA to include UI components

Awesome Lists containing this project

README

        

# `uiVBA`

A [`stdVBA`](https://github.com/sancarn/stdVBA) project to build a [`react`](https://react.dev/)-like set of UI components for VBA.

## Current state

Very incomplete and doesn't adhere to vision very well.

## Vision

```vb
Class Video
Private Type TThis
url as string
title as string
description as string
End Type
Private This as TThis

'Constructors
Public Function Create(ByVal sTitle as string, ByVal sDescription as string, ByVal sURL as string) as Video
Set Create = new Video
Call Create.protInit(sTitle, sDescription, sURL)
End Function
Public Sub protInit(ByVal sTitle as string, ByVal sDescription as string, ByVal sURL as string)
This.url = sURL
This.title = sTitle
This.description = sDescription
End Sub

'Component
Public Function Render(ui)
With ui
With .Add(uiDiv.Create())
Call .Add(uiThumbnail.Create(this.url))
With .Add(uiLink.Create(this.url))
Call .Add(uiTitle.Create(content := this.title))
Call .Add(uiParagraph.Create(content := this.description))
End With
Call .Add(uiLikeButton.Create(this.url))
End With
End With
End Function
End Class
```

Analagous to

```js
function Video({ video }) {
return (




{video.title}


{video.description}





);
}
```

For some UI like:

![image](https://github.com/sancarn/uiVBA/assets/7938900/35467013-b21d-4148-a4f2-09fb4fcc5890)