Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Release notes
Changelog
Elyra

Switch

On or off, now. Use it for a setting that takes effect the moment it's flipped. For a choice that's saved with a form, use a Checkbox.

Examples
<script>
  import { Switch } from "@elyra/ui";

  let autostart = $state(true);
  let saved = $state("");
</script>

<Switch bind:checked={autostart} onchange={(on) => (saved = on ? "Starts with the computer." : "Won't start on its own.")}>
  Open at login
</Switch>
<Switch disabled>Beta updates</Switch>
<span>{saved}</span>

onchange(checked) is told after each flip. Save the setting there.

Keyboard

Key
Space, Enter Flips it.

Clicking the label does too.

Accessibility

  • A <button role="switch"> with aria-checked. The label is a <label for> it.
  • In a Field, it has the field's id and aria-describedby.

API

Switch

Prop Type Default Description
checked (bindable) boolean false
disabled boolean false
onchange (checked: boolean) => void — Told after each flip.
class string "" Added to the switch's outer element.
children Snippet — The label.

Other attributes go to the <button>.