Discover hands-on examples demonstrating how to build real-world applications features with ebosma.
View ExamplesLearn to create reusable buttons with custom styling and interactive states.
View Example
import { state, Component } from '@ebosma/core'
export default function Button ({ label, onClick }) {
const hovered = state(false)
const baseStyle = 'px-4 py-2 rounded transition-all text-white'
const hoverStyle = 'scale-105'
return (
<button
class={`${baseStyle}
bg-indigo-600
${hovered.value ? hoverStyle : ''}`}
onClick={onClick}
onMouseEnter={() => hovered.value = true}
onMouseLeave={() => { hovered.value = false }}
>
{label}
</button>
)
}
// Usage
<Button onClick={() => console.log('Clicked!')} label="Click Me" />
Start building your next project with our ready-made examples templates and starter kits.
View Starter Templates