-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35b4863
commit d243372
Showing
104 changed files
with
2,791 additions
and
2,188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
title: Button | ||
description: How to use the Button component from the Apfel kit. | ||
nav: 40 | ||
--- | ||
|
||
<Sandpack | ||
template="react-ts" | ||
customSetup={{ | ||
dependencies: { | ||
'three': 'latest', | ||
'@react-three/fiber': 'latest', | ||
'@react-three/uikit': 'latest', | ||
'@react-three/uikit-apfel': 'latest', | ||
'@react-three/drei': 'latest', | ||
}, | ||
}} | ||
files={{ | ||
'/App.tsx': `import { Canvas } from "@react-three/fiber"; | ||
import { Fullscreen } from "@react-three/uikit"; | ||
import { Defaults } from "@react-three/uikit-apfel"; | ||
import { Container, Text } from '@react-three/uikit' | ||
import { Card } from "@react-three/uikit-apfel" | ||
import { Button } from "@react-three/uikit-apfel" | ||
import { BoxSelect } from '@react-three/uikit-lucide' | ||
function ButtonsOnCard() { | ||
return ( | ||
<Container flexDirection="column" md={{ flexDirection: 'row' }} alignItems="center" gap={32}> | ||
<Card borderRadius={32} padding={16}> | ||
<Container flexDirection="column" justifyContent="space-between" alignItems="center" gapRow={16}> | ||
<Button variant="icon" size="xs"> | ||
<BoxSelect /> | ||
</Button> | ||
<Button variant="rect" size="sm" platter> | ||
<Text>Label</Text> | ||
</Button> | ||
<Button variant="rect" size="lg" disabled> | ||
<Text>Label</Text> | ||
</Button> | ||
</Container> | ||
</Card> | ||
</Container> | ||
) | ||
} | ||
export default function App() { | ||
return ( | ||
<Canvas style={{ position: "absolute", inset: "0", touchAction: "none" }} gl={{ localClippingEnabled: true }}> | ||
<ambientLight intensity={0.5} /> | ||
<directionalLight intensity={1} position={[-5, 5, 10]} /> | ||
<Defaults> | ||
<Fullscreen | ||
overflow="scroll" | ||
scrollbarColor="black" | ||
backgroundColor="white" | ||
dark={{ backgroundColor: "black" }} | ||
flexDirection="column" | ||
gap={32} | ||
paddingX={32} | ||
alignItems="center" | ||
padding={32} | ||
> | ||
<ButtonsOnCard /> | ||
</Fullscreen> | ||
</Defaults> | ||
</Canvas> | ||
) | ||
}`}} | ||
/> | ||
|
||
```bash | ||
npx uikit component add apfel button | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
title: Card | ||
description: How to use the Card component from the Apfel kit. | ||
nav: 41 | ||
--- | ||
|
||
<Sandpack | ||
template="react-ts" | ||
customSetup={{ | ||
dependencies: { | ||
'three': 'latest', | ||
'@react-three/fiber': 'latest', | ||
'@react-three/uikit': 'latest', | ||
'@react-three/uikit-apfel': 'latest', | ||
'@react-three/drei': 'latest', | ||
}, | ||
}} | ||
files={{ | ||
'/App.tsx': `import { Canvas } from "@react-three/fiber"; | ||
import { Fullscreen } from "@react-three/uikit"; | ||
import { Defaults } from "@react-three/uikit-apfel"; | ||
import { Text } from '@react-three/uikit' | ||
import { Card } from "@react-three/uikit-apfel" | ||
function TextOnCard() { | ||
return ( | ||
<Card borderRadius={32} padding={32} gap={8} flexDirection="column"> | ||
<Text fontSize={32}>Hello World!</Text> | ||
<Text fontSize={24} opacity={0.7}> | ||
This is the apfel kit. | ||
</Text> | ||
</Card> | ||
) | ||
} | ||
export default function App() { | ||
return ( | ||
<Canvas style={{ position: "absolute", inset: "0", touchAction: "none" }} gl={{ localClippingEnabled: true }}> | ||
<ambientLight intensity={0.5} /> | ||
<directionalLight intensity={1} position={[-5, 5, 10]} /> | ||
<Defaults> | ||
<Fullscreen | ||
overflow="scroll" | ||
scrollbarColor="black" | ||
backgroundColor="white" | ||
dark={{ backgroundColor: "black" }} | ||
flexDirection="column" | ||
gap={32} | ||
paddingX={32} | ||
alignItems="center" | ||
padding={32} | ||
> | ||
<TextOnCard /> | ||
</Fullscreen> | ||
</Defaults> | ||
</Canvas> | ||
) | ||
}`}} | ||
/> | ||
|
||
```bash | ||
npx uikit component add apfel card | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: Checkbox | ||
description: How to use the Checkbox component from the Apfel kit. | ||
nav: 42 | ||
--- | ||
|
||
<Sandpack | ||
template="react-ts" | ||
customSetup={{ | ||
dependencies: { | ||
'three': 'latest', | ||
'@react-three/fiber': 'latest', | ||
'@react-three/uikit': 'latest', | ||
'@react-three/uikit-apfel': 'latest', | ||
'@react-three/drei': 'latest', | ||
}, | ||
}} | ||
files={{ | ||
'/App.tsx': `import { Canvas } from "@react-three/fiber"; | ||
import { Fullscreen } from "@react-three/uikit"; | ||
import { Defaults } from "@react-three/uikit-apfel"; | ||
import { Card } from "@react-three/uikit-apfel" | ||
import { Checkbox } from "@react-three/uikit-apfel" | ||
function CheckboxOnCard() { | ||
return ( | ||
<Card borderRadius={32} padding={16} flexDirection="column" gapRow={16}> | ||
<Checkbox disabled defaultSelected={false} /> | ||
<Checkbox defaultSelected={true} /> | ||
</Card> | ||
) | ||
} | ||
export default function App() { | ||
return ( | ||
<Canvas style={{ position: "absolute", inset: "0", touchAction: "none" }} gl={{ localClippingEnabled: true }}> | ||
<ambientLight intensity={0.5} /> | ||
<directionalLight intensity={1} position={[-5, 5, 10]} /> | ||
<Defaults> | ||
<Fullscreen | ||
overflow="scroll" | ||
scrollbarColor="black" | ||
backgroundColor="white" | ||
dark={{ backgroundColor: "black" }} | ||
flexDirection="column" | ||
gap={32} | ||
paddingX={32} | ||
alignItems="center" | ||
padding={32} | ||
> | ||
<CheckboxOnCard /> | ||
</Fullscreen> | ||
</Defaults> | ||
</Canvas> | ||
) | ||
}`}} | ||
/> | ||
|
||
```bash | ||
npx uikit component add apfel checkbox | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: Input | ||
description: How to use the Input component from the Apfel kit. | ||
nav: 49 | ||
--- | ||
|
||
<Sandpack | ||
template="react-ts" | ||
customSetup={{ | ||
dependencies: { | ||
'three': 'latest', | ||
'@react-three/fiber': 'latest', | ||
'@react-three/uikit': 'latest', | ||
'@react-three/uikit-apfel': 'latest', | ||
'@react-three/drei': 'latest', | ||
}, | ||
}} | ||
files={{ | ||
'/App.tsx': `import { Canvas } from "@react-three/fiber"; | ||
import { Fullscreen } from "@react-three/uikit"; | ||
import { Defaults } from "@react-three/uikit-apfel"; | ||
import { Card } from "@react-three/uikit-apfel" | ||
import { Input } from "@react-three/uikit-apfel" | ||
import { useState } from 'react' | ||
function InputsOnCard() { | ||
const [text, setText] = useState('') | ||
return ( | ||
<Card flexDirection="column" borderRadius={32} padding={16}> | ||
<Input value={text} onValueChange={setText} variant="rect" placeholder="Placeholder" /> | ||
</Card> | ||
) | ||
} | ||
export default function App() { | ||
return ( | ||
<Canvas style={{ position: "absolute", inset: "0", touchAction: "none" }} gl={{ localClippingEnabled: true }}> | ||
<ambientLight intensity={0.5} /> | ||
<directionalLight intensity={1} position={[-5, 5, 10]} /> | ||
<Defaults> | ||
<Fullscreen | ||
overflow="scroll" | ||
scrollbarColor="black" | ||
backgroundColor="white" | ||
dark={{ backgroundColor: "black" }} | ||
flexDirection="column" | ||
gap={32} | ||
paddingX={32} | ||
alignItems="center" | ||
padding={32} | ||
> | ||
<InputsOnCard /> | ||
</Fullscreen> | ||
</Defaults> | ||
</Canvas> | ||
) | ||
}`}} | ||
/> | ||
|
||
```bash | ||
npx uikit component add apfel input | ||
``` |
Oops, something went wrong.