Screenshot of the PdfContainer
Screenshot of the PdfViewer (Promise)
import { PdfViewer } from '@/components/twc-ui/pdf-viewer'
const doSomething = async () => {
await PdfViewer.call({
file: '/compressed.tracemonkey-pldi-09.pdf'
})
}
import { PdfContainer } from '@/components/twc-ui/pdf-container'
export const Demo = () => {
return (
<PdfContainer file="/compressed.tracemonkey-pldi-09.pdf" />
)
}
export default Demo
PDF-Container / PDF-Viewer
React Shadcn
#react #shadcn
18.12.2025 20:44
๐ 3
๐ 0
๐ฌ 0
๐ 0
import { AlertDialog } from "@/components/twc-ui/alert-dialog";
const doSomething = async () => {
const confirmed = await AlertDialog.call({
title: "Are you absolutely sure?",
message:
"This action cannot be undone. This will permanently delete your account and remove your data from our servers.",
buttonTitle: "Delete Account",
variant: "destructive"
});
};
18.12.2025 20:34
๐ 1
๐ 0
๐ฌ 0
๐ 0
Alert dialog with promise
#react #shadcn
18.12.2025 20:34
๐ 3
๐ 1
๐ฌ 1
๐ 0
import { DemoContainer } from '@/components/docs/DemoContainer'
import { Button } from '@/components/twc-ui/button'
import { Form, useForm } from '@/components/twc-ui/form'
import { FormGroup } from '@/components/twc-ui/form-group'
import { TextField } from '@/components/twc-ui/textfield'
import { Head } from '@inertiajs/react'
interface Props {
contact: App.Data.ContactData
}
export default function FormDemo ({ contact }: Props) {
const form = useForm<App.Data.ContactData>(
'contact-form',
'post',
route('contact.store'),
contact
)
return (
<DemoContainer>
<Head title="Form Demo" />
<Form form={form} errorVariant="field">
<FormGroup>
<div className="col-span-12">
<TextField
label="First name"
{...form.register('first_name')}
/>
</div>
<div className="col-span-12">
<TextField
label="Last name"
{...form.register('last_name')}
/>
</div>
<div className="col-span-12">
<TextField
label="E-Mail"
{...form.register('email')}
/>
</div>
<div className="col-span-12">
<Button title="Save" type="submit" />
</div>
</FormGroup>
</Form>
</DemoContainer>
)
}
Sneak preview: A DRYer form with precognition. #reactjs #shadcn #intertiajs #laravel
17.06.2025 15:01
๐ 4
๐ 0
๐ฌ 0
๐ 0