Seam - A reactive state library with rich functionality (for UI, gameplay mechanics, and more)

I know a couple of other people who mentioned something similar and it’s been on the backburner to try. Keep an eye peeled for this!

The public release / main branch don’t have this protection, which is something my team ran into the other day. This is fixed in the dev branch and will be released soon.

To my memory this is not the case.

1 Like

:+1: :+1: Thx 4 great open source!
Btw, this button does not work in your tutorial github website. Getting Started | Seam

2 Likes

Thanks!

What happens when you click the button? Nothing at all? What page were you on?

1 Like

It’s the getting started page, and yes, nothing happens even if I press that button.

1 Like

Version 0.3.0 public release

Version 0.3.0 of Seam is here! Included in this update is:

  • Removal of From and DeclareComponent, revamp of components system
  • Removal of preset components
  • Addition of GetValue
  • Improvements to the backend
  • Fixes to race conditions
  • Fixes to crashes and infinite loops
  • And an insane number of other fixes

This version, to put it generously, is a huge step up for Seam. Many of these fixes and changes come from internal feedback sourcing from people that used it in production! I worked closely with these developers to get a dev branch stable and working that meets their needs – and that dev branch is now the publicly released version v0.3.0.

Revamped component system

The biggest change to Seam was the complete rethinking of the way components worked. Previously, there was a race condition to declare components, store them memory, and then use them with From. This approach was also super limited and unintuitive. Now, you create instances of components by passing the component module directly into New, giving you more control. As a bonus, these new components are object-oriented!

I got a ton of feedback regarding components from both @3_F7 and @HappySunChild (as well as some others on other platforms), with the former developer testing my approach and approving it. You can take a look at how components work by reading the API for New and Component!

In summary, components now work like this:

  • Create the component module, containing Init and Construct methods, as well as any others you optionally want
  • Return Component(Module), instead of just Module
  • Pass in that module to the first parameter of New, and make the properties whatever you would like (they are custom, not directly applied)

I also removed preset components from Seam because, well, they feel like bloat. I would rather leave component creation to the developers and the community, who can do it much better than I can.

Addition of GetValue

GetValue is an added declaration that allows you to read any value, including states.

In this example,

local MyValue = Value(5)
local X = GetValue(5)
local Y = GetValue(MyValue)

X and Y are both 5. This is a great thing to try if your code may or may not have a state, but you need a value to work with.

Fixed many, many bugs

I fixed a ton of bugs, and had a headache doing so (you can probably tell if you look at the commit messages, lol).

A summary of fixed bugs include:

  • Fixed a C-stack overflow caused by adverse state interactions
  • Critical fix for boolean value states
  • Typechecking fixes
  • Fixes to the way tables in values worked, including a fix to how they wouldn’t update
  • Rendered is now properly declared as Rendered behind the scenes, not Computed
  • Addition of Value.ValueRaw for cases that need it (since Value.Value got tons of changes for tables)
  • Fixed signal triggers not triggering when using table.insert on value’s value.
  • Fixed critical issues with animation states that could cause insane lag or bugs
  • Fixed an edge-case error that was caused by declaring children improperly
  • Updated the way compute states calculate values, preventing edge-case issues
  • And more small stuff!

Seam’s development philsophy remains unchanged

Seam is intended to be an improvement compared to existing UI frameworks, not a headache; this means community feedback will drive the direction of the library, and comes first for considerations on changes.

A large handful of developers were important to providing feedback to influence these changes, so my gratitude goes out to all of you!

That’s all folks, enjoy a more stable and awesome Seam! :3

2 Likes

There’s no .rbxm for 0.3.0 :frowning: , could you perhaps add one?

1 Like

Oops, that was a mistake! Do you see it on the releases now?

1 Like

v0.3.1 patch

As a quick patch, version 0.3.1 has released! Here is what changed:

  • Added SetValue
  • Animation states (Spring and Tween) now calculate on pre-render (instead of render) to fix occasional bugs
  • Backend changes
  • Added Tags

Also, documentation for GetValue was finally added, even though it’s been around since 0.2.2; this was a previous mistake, oops!

SetValue is a safe and alternative way to set state values. It really boils down to preference whether you use this, or Value.Value.

Tags is used to add CollectionService tags to an instance when creating or hydrating with New! See the documentation for more info.

Animation states were changed to RunService.PreRender instead of RunService.RenderStepped to prevent occasional issues. For example, you might’ve previously had weird bugs come from animation states being read every frame, but not updated properly. This should now be fixed!

There were also backend changes, but most notably, all of the codebase was changed from lua to luau. I had previously used lua out of habit, not because it’s better.

That’s it! Make sure to update Seam to get these newest features and fixes.

I wish there were more examples on the docs!! I’m having a hard time learning how to use this because I’ve never used a UI library before. The examples listed on the docs seem like they would be really helpful but they are empty pages. No rush though!! This is looking to be really cool

1 Like

Keep an eye peeled! I’ll be posting examples very soon!

2 Likes

It’s not much, but I did post an expressive button example to hold ya over. Expressive button | Seam

This is insane. I thought it was going to be some arbitrary reskinned Gui Module that may save you maybe one or two lines of code but actually I couldn’t be more wrong.

I’m definitely going to be using this module in the future.

Oh and if you haven’t seen that little button on the Examples page on the documentation well..oh…its so…squishy. yum ooo its so
responsive
and squishy oooooa
wow!

2 Likes

v0.3.2 is out!

Version 0.3.2 has just released. Not much changed, but it might be worth updating if you have random problems!

In this version, the following changes were made:

  • Fixed shadowed variables in the code
  • Fixed typechecking issues
  • Fixed unused variables
  • Added selene.toml to source code
  • Fixed and optimized issues related to computed-based children
  • Fixed an issue with errors on the backend state manager
  • Adjusted typechecking for New in scope instance

That’s it! Hope everybody had a happy holidays, and I wish you folks a great new year!

Version 0.3.3 released!

Two updates in two days? Wow, we’re ending 2025 strong! Version 0.3.3 just dropped some utilities and more!

First and foremost, there are a lot of small little things you might like with this update. To begin, there is a new category in the API, called “Utilities”. GetValue and SetValue are now both under this category.

The following changes have been made this update:

  • Re-organized all constructors into sub-folders on the backend
  • Components can now be edited as dictionaries by outside code
  • Components now have associated symbols on the backend
  • Added IsState (utility)
  • Added IsComponent (utility)
  • Added LockValue (utility)
  • Added MakeSymbol (utility)
  • Added MakeSignal (utility)
  • Added Inspect (utility)
  • Added OnAttached (connection)
  • Added Destroyed (declaration)

These all have various levels of “helpfulness”, but regardless, they exist for when you need them! Take a look at the documentation to see more information about all of these.

Enjoy the new update, and again from the last update, have a happy new year!

1 Like

How is this any better than fusion?

1 Like

It boils down to:

  • Better performance
  • More feature-rich
  • Simpler on the backend
  • Has a built-in solution for components

I have a generalized comparison between Seam and other UI frameworks in general too, if you are curious: Why use Seam over other frameworks? | Seam

1 Like

Update 0.3.4

New year, new update! v0.3.4 introduces EventSequence, alongside some other changes and API doc improvements.

Before going deeper, this is the summary of changes made:

  • Added EventSequence
  • Completely rewrote the math for springs, fixing bugs relating to critical dampening
  • Backend changes
  • Removed From and DeclareComponent errors when trying to refer to them, and they now just return nil
  • Improved API documentation

The big highlight of this update is EventSequence, which is a way to, well, sequence stuff. It’s great for complex animations with many changing values and moving parts.

Here is an example using it:

local TestValue = Value(5)

OnChanged(TestValue, function()
	print(TestValue.Value)
end)

local TestSequence = EventSequence({
	{
		Time = 0.1,
		ValueSource = TestValue,
		NewValue = 10,
	},
	
	{
		Time = 1,
		ValueSource = TestValue,
		NewValue = 15,
	},
	
	{
		Time = 3,
		ValueSource = TestValue,
		NewValue = 25,
	},
	
	{
		Time = 2.5,
		ValueSource = TestValue,
		NewValue = 20,
	},
	
	{
		Time = 5,
		Callback = function()
			print("Reached 5 seconds")
		end,
	}
})

TestSequence:Play() -- Over the course of 5 seconds, it prints 10, 15, 20, 25, and "Reached 5 seconds"

Aside from that, let’s talk about springs. When I first added Spring, it had a comment in the math function saying:

I copied this spring math from another module I did a long time ago, so let’s hope it doesn’t explode.

And well… it exploded. It turns out the math didn’t do a good job with critically dampened springs that were updated often, usually causing crazy results. The new math should fix this.

On the backend, the big change I did was swap from Janitor to Trove for anything cleanup-related, since Janitor wasn’t very reliable at times. That being said, in the future I plan to swap out Trove for Heap, a cleanup module of mine that was just birthed (GitHub - MiaGobble/Heap: A cleanup module similar to Trove, Janitor, or Maid.).

Finally, From and DeclareComponent will no longer throw an error when referenced, and all references to them are now cut. If you still try to use them, you will get a nil value.

I want to point out that alongside this update is some improvements to the API documentation, which should hopefully better explain some key parts of Seam.

That’s this update! Let me know how event sequences and springs work for you.

3 Likes

Evolving beyond UI (v0.4.0 update)

v0.4.0 of Seam evolves this library to not just be for UI, but general purpose. It’s now usable on the server and has some changes to the API. As a bonus, the documentation is now complete!

To summarize, here are the changes made to Seam:

  • Removed MakeSignal()
  • Removed MakeSymbol()
  • Added .Looped to EventSequence
  • Adjusted EventSequence so that keypoints are now an array, with index 1 being the time, and index 2 being the callback. ValueSource and NewValue have been removed
  • Adjusted the backend so that the entirety of Seam works on the server too

Seam has been rebranded to be more general-purpose, meaning it’s no longer just for UI. Reactive states and other Seam features can be handy in a number of situations outside of UI/UX, so it’s best to take advantage of it! Seam now also works on the server, so it can be used there too.

Other than that, the API got modified a bit. MakeSignal() and MakeSymbol() were removed since it’s better practice to just use different libraries for those.

Additionally, EventSequence got changed. Read the API docs for more info, but this is an example of what it looks like now:

local EventSeqeuence = Seam.EventSequence({
	{1, function()
		print("a")
	end},
	
	{2, function()
		print("b")
	end},
	
	{3, function()
		print("c")
	end},
})

EventSeqeuence:Play()

Finally, examples and tutorials are now complete, meaning you should no longer find warnings saying there is missing documentation.

And that’s it! Enjoy v0.4.0.

1 Like

Note: v0.4.1 just released to fix a critical issue. Use that instead!

2 Likes

From what I’ve seen in the docs this is a really good library! But I was wondering if it supports multiple components for a single instance? This would be nice for some kind of composition system but based off the docs I’m not sure it’s possible