new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

shadcn/ui · Components · all subjects

direction/usage

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

useDirection hook example

Example of using the useDirection hook: import { useDirection } from "@/components/ui/direction" function MyComponent() { const direction = useDirection() return <div>Current direction: {direction}</div> }

DirectionProvider import

Import DirectionProvider with: import { DirectionProvider } from "@/components/ui/direction"

DirectionProvider usage example

The DirectionProvider component wraps your app content and accepts a direction prop. Example usage: <html dir="rtl"> <body> <DirectionProvider direction="rtl"> {/* Your app content */} </DirectionProvider> </body> </html>

useDirection hook purpose

The useDirection hook is used to get the current direction of the application.

useDirection hook import

Import useDirection with: import { useDirection } from "@/components/ui/direction"

DirectionProvider basic usage example

Import DirectionProvider from '@/components/ui/direction'. Wrap your app content in the DirectionProvider component, setting the direction prop to 'rtl' for right-to-left or 'ltr' for left-to-right. Also set the dir attribute on the html element to match the direction. Example: ```tsx import { DirectionProvider } from "@/components/ui/direction" <html dir="rtl"> <body> <DirectionProvider direction="rtl"> {/* Your app content */} </DirectionProvider> </body> </html> ```

DirectionProvider usage example with RTL

To use DirectionProvider with RTL direction, wrap your app content with the component: ```tsx import { DirectionProvider } from "@/components/ui/direction" <html dir="rtl"> <body> <DirectionProvider direction="rtl"> {/* Your app content */} </DirectionProvider> </body> </html> ``` The direction prop accepts 'rtl' or 'ltr' values.

useDirection hook

The useDirection hook is used to get the current direction of the application. It can be imported from '@/components/ui/direction' and called within a component to access the current direction value: ```tsx import { useDirection } from "@/components/ui/direction" function MyComponent() { const direction = useDirection() return <div>Current direction: {direction}</div> } ```

Give your agent this brain