Toggle

A toggle button, that can be on or off.

Examples

import { Toggle } from "@styple/design-system";
<Flex css={{ gap: "$md" }} >
<Toggle css={{ fontWeight: "$bold", }} >B</Toggle>
<Toggle>I</Toggle>
<Toggle css={{ textDecoration: "underline", }} >U</Toggle>
<Toggle size="lg">L</Toggle>
</Flex>

API Reference

See Radix-UI Toggle (v0.1.4) for details. This only covers styple abstractions.

Toggle

A styled abstraction for the entire primitive. Custom props:

Prop Type Default Explanation
size"sm" | "lg""sm"

Size variant.