Skip to content

Using our components

You're able to use a lot of Iridium's components directly inside your custom pages.

Most components have concrete varients, you can call and configure directly from anywhere.

Using a component

You can call and configure our components similarly to how you do in the rest of Iridium.

Critically, there is no callback methods like LabelFn allowed on these components. You're limited to calls like Label

Example

In a custom templ component, you can initilalize and use our label component as so

go
// some_templ_file.templ
import "github.com/iridiumgo/iridium/core/field/components"


templ MyComponent() {
    @components.NewInputConcrete("my-input").
        Label("Hi").
        Description("Bye").
        Component()
    // Your other custom HTML
}

Note

For the first iteration of Iridium, we're going a little light on the documentation for these. We recommened in the time being, to look through our concrete varients. Link

Released under the MIT License.