Skip to main content

Buttons

Displays a button.

Icon Button

Code Example

import { Button, Glass, IconButton } from "@coconut-xr/apfel-kruemel";
import { Container, Text } from "@coconut-xr/koestlich";
import { BoxSelect } from "@coconut-xr/lucide-koestlich";

export default function IconButton() {
return (
<Glass borderRadius={32} padding={16}>
<IconButton size="md">
<BoxSelect />
</IconButton>
</Glass>
);
}

Sandbox

Icon Button Params

NameTypeAttributesDescription
sizeSizeoptional / default: "md"Sets the size of the button. Options are "sm" / "md" / "lg"
platterbooleanoptional / default: falseIf true, changes the appearance of the icon button to a platter state
selectedbooleanoptional / default: falseIf true, changes the appearance of the icon button to a selected state
disabledbooleanoptional / default: falseIf true, disable all interactions for the button

Text Button

Code Example

import { Button, Glass, IconButton } from "@coconut-xr/apfel-kruemel";
import { Container, Text } from "@coconut-xr/koestlich";
import { BoxSelect } from "@coconut-xr/lucide-koestlich";

export default function TextButton() {
return (
<Glass borderRadius={32} padding={16}>
<Button style="rect" size="md" selected>
<Text>Label</Text>
</Button>
</Glass>
);
}

Sandbox

Button Params

NameTypeAttributesDescription
sizeSizeoptional / default: "md"Sets the size of the button. Options are "sm" / "md" / "lg"
styleStyleoptional / default: "rect"Style of the button. Options are "rect" / "pill"
platterbooleanoptional / default: falseIf true, changes the appearance of the button to a platter state
selectedbooleanoptional / default: falseIf true, changes the appearance of the button to a selected state
disabledbooleanoptional / default: falseIf true, disable all interactions for the button